Semantius Logo

Formats

On this page

A field’s format controls validation at two levels. In the database it decides the column’s type, and with it what the database accepts. In the app it decides how the field is shown and edited: the app supports every format below as an input, and validates the value’s syntax in its forms. Every column is NOT NULL except dates, times, UUIDs and references: an empty field holds its format’s empty value.

FormatHoldsColumn typeEmpty value
arrayAny JSON arrayJSONB[]
binaryBinary data; no format checkBYTEAEmpty
booleantrue or falseBOOLEANfalse
byteBase64-encoded dataTEXT''
codeSource code; no format checkTEXT''
colorHTML colorTEXT''
dateFull date, RFC 3339 (2026-09-15)DATEnull
date-timeDate and time, RFC 3339 (2026-09-15T14:30:00Z)TIMESTAMPTZnull
doubleDouble-precision floating-point numberDOUBLE PRECISION0
durationDuration, ISO 8601 (P3DT4H)INTERVAL0
emailEmail address, RFC 5321; Unicode allowed as in RFC 6531 (jörg@müller.de); validates the same as idn-emailTEXT''
enumOne of the values listed in enum. See Enum.TEXT''
floatSingle-precision floating-point numberREAL0
hostnameHost name, RFC 1123; Unicode allowed as in RFC 5890 (müller.de, xn--mller-kva.de); validates the same as idn-hostnameTEXT''
htmlHTML markup; must contain at least one tagTEXT''
iconName of a built-in iconTEXT''
idn-emailInternationalized email address, RFC 6531 (jörg@müller.de); validates the same as emailTEXT''
idn-hostnameInternationalized host name, RFC 5890 (müller.de, xn--mller-kva.de); validates the same as hostnameTEXT''
int32Signed 32-bit integerINTEGER0
int64Signed 64-bit integerBIGINT0
integerAny integerINTEGER0
ipv4IPv4 addressTEXT''
ipv6IPv6 addressTEXT''
iriAbsolute IRI, RFC 3987 (https://müller.de/straße); validates the same as uriTEXT''
iri-referenceIRI or relative reference, RFC 3987 (/straße, #top); validates the same as uri-referenceTEXT''
jsonJSON value, or JSON text that parses to oneJSONB{}
json-pointerJSON Pointer, RFC 6901 (/a/0)TEXT''
json-pointer-uri-fragmentJSON Pointer as a URI fragment (#/a/0)TEXT''
jsonataJSONata expression; no format checkTEXT''
jsonlogicJsonLogic rule, checked against the operators of the Semantius backendJSONB{}
multilineMulti-line text; no format checkTEXT''
numberAny number. See Number.NUMERIC(18, precision)0
objectAny JSON objectJSONB{}
parentKey of the record that owns this one. Required. See Reference and parent.The type of the target’s keyAlways holds one
passwordPassword; no format checkTEXT''
ratingRating from 0 to 5, where 0 means not ratedINTEGER0
referenceKey of a record in another entity. May be empty. See Reference and parent.The type of the target’s keynull
regexRegular expressionTEXT''
relative-json-pointerRelative JSON Pointer (1/a)TEXT''
stringAny stringTEXT''
textSingle-line text; no format checkTEXT''
timeTime of day, RFC 3339 (14:30:00Z)TIMEnull
uriAbsolute URI, RFC 3986; Unicode allowed as in an IRI (https://müller.de/straße); validates the same as iriTEXT''
uri-referenceURI or relative reference, RFC 3986; Unicode allowed as in an IRI (/straße, #top); validates the same as iri-referenceTEXT''
uri-templateURI template, RFC 6570 (/users/{id})TEXT''
urlURL with an http, https or ftp schemeTEXT''
uuidUUID, RFC 4122UUIDnull
  • The database checks types, not syntax. It refuses a value that is not a date, a number, a UUID or JSON, and an enum value outside enum_values (23514). It does not check that an email, url or html value is well formed, that a rating is between 0 and 5, or that a jsonlogic value is a valid rule. The app checks those in its forms.
  • password is stored as plain text, like any text field.
  • time has no time zone. A date-time is stored as a point in time.

Enum

An enum field holds one of the values listed in its enum_values: a list of strings, or of objects {"value", "label", "description", "color", "icon"}. The database checks only the value; the label, description, color and icon are for the app.

  • A value outside the list is refused (23514). A field without enum_values accepts any text.
  • An enum that is not required also accepts '', its empty value. A required one refuses it (90258).
  • Removing a value that records still hold is refused (23514).

Number

A number field is stored as NUMERIC(18, precision): 18 digits in all, precision of them after the decimal point. precision is 0 to 18, default 2. Changing it rewrites the column, and lowering it rounds the stored values.

Reference and parent

Both hold the key of a record of reference_table, and their column takes the type of that key. They need more properties than the other formats:

PropertyMeaning
reference_tableThe entity the field points at. Required, and it must name an existing entity (90212).
reference_delete_modeWhat deleting the target record does: restrict (the default), clear or cascade. See Delete modes.
relationship_labelThe verb for the relationship in diagrams and navigation. Default has.
singular_label_parent, plural_label_parentFor a parent only: how the parent’s list of children names these records.

A reference may be empty and links to a record with a life of its own. A parent is required and makes the record belong to its parent. See Relationships.

Rollups

A rollup is not a format but a property of a field: its rollup column holds the definition. The field keeps an ordinary format, which has to fit the rollup’s function (90268), such as int64 for a count. See Rollup fields.