Page MenuHomeSealhub

field-types.remarkup
No OneTemporary

field-types.remarkup

Built-in Fields

Below is a list of field types that Sealious comes packaged with. You can also
create your own field types - see
./creating-field-types.remarkup.

NameIs Higher Order (Hybrid)Has attachmentsDescriptionConstructor paramsFormat paramsExample valid values
Booleantrue or flasenonenone"true", "false", true, false, 0, 1
CachedValueRemember a value and only recalculate it when some event occurssee docssame as the extended fieldsame as the extended field
ColorStores a color as stringnonenone"#ff000", "red"
ControlAccessControls who can display and/or edit the given fieldsee docssame as the extended fieldsame as the extended field
DateStores a date, as in a day in calendar, without time.nonenone"2020-12-31"
DatetimeStores a timestamp as ms since epoch. Timezone-independent.nonenull or "human_readable"1610214993421
DerivedValueCalculates a value based on other fields within the same item and stores it.see docssame as the extended fieldsame as the extended field
DisallowUpdateAllows to set the value once and then disallow any changes to it.one argument - the extended field - a Field instancesame as the extended fieldsame as the extended field
EmailAn email addressnonenone"user@example.com"
EnumAllows only values from a predefined listan array of allowed values or a function that takes an app instance and returns an array of allowed valuesnoneas defined in constructor params
FileAny kind of filenonenonea photo, a movie, a pdf
FloatAny real numbernonenone1, 1.5, -10, 3.1415926
HtmlTakes text containing HTML and sanitizes it to prevent js injectionnone"original" or "safe""<h1>Hello, world</h1>"
ImageAn image. Can be scaled to different sizes automaticallynoneone of the image formats defined in configa JPG file
IntAn integer. Takes only whole numbers{min: number, max: number}none1, 2, -10, 10000
JsonObjectTakes in arbitrary objects. Could be unsafe, requires investigation.nonenone{a: "A"}
PasswordA hashed password. Used in the users collectionnonenone"alamakota123"
RequiredWrapper that makes the wrapped field required.Warning: this is a function, not a class. Argument: child_field: Fieldsame as extended fieldsame as extended field, except for lack of value or null, which will be rejected
ReverseSingleReferenceA list of all items from a given collection that point to this item in a given fieldsee docsnonen/a
SecretTokenAttaches a secret token when creating an item. The token cannot be read without SuperContextnonenonen/a
SessionIDBasically a mutable uuidnonenonen/a - the values are generated automatically
SettableByWraps a field and makes it editable only to users matching a given Policychild_field: Field, policy: Policysame as extended fieldsame as extended field
SingleReferenceReferences another item from given collectionthe target collection as stringnone"umvg6-\_1"
TextA text field{full_text_search: boolean, min_length: number, max_length: number}"original" or "safe" (no value means "safe")"Hello, world"
ValueExistingInCollectionAccepts as a value only values that exist as values of other field in other collectionfield: string, collection: string, include_forbidden: booleansame as target fieldsame as for target field
ValueNotExistingInCollectionOpposite to ValueExistingInCollection. Only not-yet-seen values are acceptedas abovesame as target fieldsame as target field

File Metadata

Mime Type
text/plain
Expires
Wed, May 7, 19:48 (22 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
632629
Default Alt Text
field-types.remarkup (12 KB)

Event Timeline