MMBase DataType validation

This directory will contain the javascript and serverside components to enable client side validation of MMBase data types. This is work in progress. See 'datatypes' project.

Datatype of Field
of nodemanager
global datatype
20th-centuryseetestSilly example (also used to test) Allow only dates from the previous century..
20th-century-pedanticseetestPedantic version of 20th-century. Dates in the year 1900 are rejected, dates in the year 2000 are accepted.
ageseetestThis field can be used as a virtual field on a nodemanager with a birthdate field. This field then contains the 'age' in year. This is both settable and gettable.
binaryseetestBlobs. Images, attachments, those kind of things.
birthdateseetestDataType specialized for storing birthdates. So, no times. Defaults to 30 years ago. No future dates are accepted.
booleanseetestBoolean fields can always contain only two possible values which could be interpreted in several ways (defaults to 'true' and 'false').
byteseetestThe values 0 - 255 are possible.
captchaseetestcaptcha
checkseetestBoolean with no explicit enumeration. Will result in checkboxes.
checkequalityseetestThis is a field datatype that of which the value is only valid, if it is equal to the value of another field in this node. The other field's name is default empty but it can be changed by overriding the property 'field'.
checksumseetestThe default 'checksum' datatype checksums the 'handle' field, but you can of course define your own (anonymously in the builder xml e.g.) for other fields. This is a read-only field which is automaticly filled on commit of the node. If you define this field as unique, then the effect is that a handle field which already is present in the database, cannot be saved.
colorsseetestColors as can be used in css.
componentsseetestThe names of all available MMBase Framework Components
confirmpasswordseetestThis is a field datatype that of which the value is only valid, if it is equal to the value of another field in this node. The other field's name is default 'password' but it can be changed by overriding the property 'field'.
createdseetestRead-only date-time field that contains the time of creation of the node.
creatorseetestA ready-only field, which contains the user id of the user that created the node to wich the field belongs.
currencyseetestArbitrary precision numbers
currency_enforcescaleseetestArbitrary precision numbers
dateseetestA date-time field that ignores the time part.
datetimeseetestDateTime fields contain absolute points in time. TODO: say something about timezones here. Getting it as a String results in a formatted datetime according to the locale (of the cloud e.g.).
decimalseetestArbitrary precision numbers
dirsseetestEnumeration for the 'dir' field of certain MMBase system builders.
doubleseetestDouble precision floating point numbers.
durationseetestDurations are positive longs, which present a number of seconds. (for other units, we may have to introduce other datatypes).
dutch-zipcodeseetestThe valid values of such a field, are zip-codes as they are used in the Netherlands.
elineseetestA String that may not contain newlines (this is enforced). Practicly this will result in 'input type="text"' form entries.
email_typeseetestNot so very big integer numbers. Common base for all kind of enumerations.
emailaddressseetestThe valid values of such a field must be a valid email address. The current implemenation is by a rather simple regular expression.
enableddisabledseetestBoolean interpreted as enabled/disabled
eventtimeseetestDateTime fields contain absolute points in time. TODO: say something about timezones here. Getting it as a String results in a formatted datetime according to the locale (of the cloud e.g.).
fieldseetestMainly supplied for backwards compatibility. A String without further restrications. Practicly this will result in textarea form entries.
fileseetest
filenameseetestA filename field removes directory information on set.
filesizeseetestInteger interpreted as a filesize. Results in a 'string' representation postfixed by 'KiB' etc.
filesize_deprecatedseetestInteger interpreted as a filesize. Results in a 'string' representation postfixed by 'kbyte' etc.
floatseetestFloating point numbers.
genderseetestA member of one or other sex, or rather being male or female.
historicalseetestHistorical dates, with a ERA designator.
hour_of_dayseetestStores an hour of the day (so a number from 0 to 23)
htmlseetestPrincipally, HTML could be valid XML.
indexseetestString fields contain text.
integerseetestNot so very big integer numbers. Common base for all kind of enumerations.
internetaddressseetestValidates using javax.mail.internet.InternetAddress#parse. Can be used for (multiple) email-addresses. See javadoc. http://java.sun.com/products/javamail/javadocs/javax/mail/internet/InternetAddress.html#parse(java.lang.String)
ipseetestA ready-only field, which contains the IP address of the of the last user that changed the node to which the field belongs.
iso3166seetestISO 3166 language 2-letter country codes
iso639seetestISO 639 language 2-letter codes (sorted alphabeticly on the name of the language in the current locale)
lastmodifiedseetestRead-only date-time field that contains the most recent time at which this node was changed .
lastmodifierseetestA ready-only field, which contains the user id of the last user that changed the node to which the field belongs.
lineseetestA String that may not contain newlines (though this is not enforced). Practicly this will result in 'input type="text"' form entries.
listseetestList valued
list[unknown]seetestlist[unknown]
living-birthdateseetestDataType specialized for storing birthdates for people currently alive. Minimal value 140 years ago. Because this gives limited number of possible years, a dropdown for the year field becomes possible.
longseetestLongs can contain very big (positive and negative) integer numbers.
lowercaseuppercaseseetestSilly example (also used to test) Strings are stored all lowercase, but showed all uppercase
md5passwordseetestIn the database an MD5 of the value which is set into this field is set. If you try to get this value as a String, the empty String is returned.
mediaseetestMedia types.
minute_of_hourseetestStores a minute in an hour (so a number from 0 to 59)
mmxfseetestXML fields can be used for 'richtext' fields, or other fields which are (supposed to be) valid XML.
mmxfunpseetestXML fields can be used for 'richtext' fields, or other fields which are (supposed to be) valid XML.
nodeseetestReference to an MMBase node.
nodemanagersseetestThe names of all available MMBase NodeManagers
nodenumberseetestJust a node-field, but getting it as a String returns the node-number, rather then some odd toString of a Node object.
objecttypeseetestIf you define a virtual field with this type in your builder, then it actually works as an editable 'otype' field. In other words, the _type_ of the node becomes editable, which in some cases can come in handy.
onoffseetestBoolean interpreted as on/off
ordinalsseetest'First', 'second' etc. Implemented by a drop-down, so don't expect 'twothousandeth' to work.
origin-traceseetestAutomaticly fills the java-stack trace in the value (if it is still null) on commit. This debug aid can be used to trace which code, and why, committed the node.
ownerseetestThe values of this field are restricted to the possible 'security contexts' of the current user as defined by the MMBase Security implementation.
phys_angleseetestAn angle in radials (1 radian = 180 / π degrees).
phys_distanceseetestSome distance, in the SI unit meters. Always positive.
phys_durationseetestAn physical duration, in seconds.
phys_energyseetest
phys_massseetestAn physical mass.
phys_temperatureseetestA physical temparature.
positive_integerseetestNot so very big integer numbers. Common base for all kind of enumerations.
reldefseetestReference to an MMBase node of the type 'reldef'.
requiredfieldseetestString fields contain text.
scale1-10seetestA scale from 1 to 10.
security_contextseetestUses 'setContext' and 'getContext'. The idea is to use this type for a 'virtual' field.
sgenderseetestGender stored in a string 'M' or 'F'.
spellsseetestDemo-enumeration for wizards.
stringseetestString fields contain text.
timeseetestA date-time field that ignores the date part. Actually this is stored as a time on 1970-01-01, but you can use this to indicate an hour of any day. Generic editors will not offer to edit the date parts of the date-time.
trimmedlineseetestA String that may not contain newlines, after it is trimmed. Practicly this will result in 'input type="text"' form entries.
trimmedrequiredlineseetestA String that may not contain newlines, after it is trimmed. After trimming, there must be at least one character
typedefseetestReference to an MMBase node of the type 'typedef'.
unknownseetestunknown
userseetestOnly nodes associated with users are possible. Default value is current user.
utctimeseetestA date-time field that ignores the date part. Actually this is stored as a time on 1970-01-01, but you can use this to indicate an hour of any day. Generic editors will not offer to edit the date parts of the date-time.
verify_emailseetestIf this other field is changed, then this change will be ignored but in stead be stored on this 'verify email' field, together with a verification key. The verification can then be done by setting this key in this verify field (so, over the implicitely stored value). If the key is then the same as already stored, then the new email value is stored in the actual email field, and the verify field is emptied.
weekdaysseetestStores a day of the week (so a number from 1 to 7)
weeknumbersseetestExotic specialization of 'date'. It will allow entering dates using the week-number and the name of the day. In controdiction to a more conventional notation with month and day of the month.
whitespacecollapserseetestIf you set a value in a field with this datatype, then all occurences of one or more whitespace characters are removed before the value is committed to the database.
whitespacereplacerseetestIf you set a value in a field with this datatype, then all occurences of one or more whitespace characters are replaced by one space before the value is committed to the database.
windowstateseetestString fields contain text.
xmlseetestXML fields can be used for 'richtext' fields, or other fields which are (supposed to be) valid XML.
xmlfieldseetestAdds processor to getting and setting as String, so that it looks like plain text then.
yesnoseetestBoolean interpreted as yes/no