Skip to main content

Overview

Each Attribute has a type — the combination of its data_type and appearance — which determines how its value is presented and validated. This page lists every available type and the rules you can configure on each.

Types

Data typeAppearanceDescriptionValidation
textshortSingle-line textMust be text
textlongMulti-line textMust be text
textfull_formattedRich text (HTML)Must be text
textmarkdownMarkdown textMust be text
textmjmlMJML email markupMust be text
textphonePhone numberMust be text
textlistDropdownMust be one of options
numberintegerWhole or decimal numberMust be a number
numberspinnerStepper (decimals allowed)Must be a number
numbersliderSlider (decimals allowed)Must be a number
numberrating_starsStar ratingMust be a whole number
booleancheckboxTrue / falseMust be true or false
booleanlike_dislikeLike / dislike toggleMust be true or false
datetimedatetimeDate and timeMust be a valid date-time
datedateDate onlyMust be YYYY-MM-DD
timetimeTime onlyMust be a valid time
locationdefaultGeographic point (GeoJSON)Must be a valid location point
mediafileA file from the DAMMust reference an existing file
mediaimageAn image from the DAMMust reference an image
mediavideoA video from the DAMMust reference a video
groupdefaultA group of nested attributesEach child validated by its own type

Configurable rules

Beyond the automatic type check above, some appearances let you set extra validation rules (stored on the attribute’s validations):
Data typeAppearanceConfigurable rules
textshort, longmin / max length, and a regular_expression
textlistoptions — the list of allowed values
numberinteger, spinner, slidermin, max, decimals, a display symbol ($, €, £, ¥, %), and a thousands separator
datedatemin / max date
Appearances not listed — media, location, boolean, datetime, time, rating_stars, mjml, markdown, full_formatted, and phone — have no configurable rules.

Attributes

How attributes are defined, scoped, and used.