Overview
Each Attribute has a type — the combination of itsdata_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 type | Appearance | Description | Validation |
|---|---|---|---|
text | short | Single-line text | Must be text |
text | long | Multi-line text | Must be text |
text | full_formatted | Rich text (HTML) | Must be text |
text | markdown | Markdown text | Must be text |
text | mjml | MJML email markup | Must be text |
text | phone | Phone number | Must be text |
text | list | Dropdown | Must be one of options |
number | integer | Whole or decimal number | Must be a number |
number | spinner | Stepper (decimals allowed) | Must be a number |
number | slider | Slider (decimals allowed) | Must be a number |
number | rating_stars | Star rating | Must be a whole number |
boolean | checkbox | True / false | Must be true or false |
boolean | like_dislike | Like / dislike toggle | Must be true or false |
datetime | datetime | Date and time | Must be a valid date-time |
date | date | Date only | Must be YYYY-MM-DD |
time | time | Time only | Must be a valid time |
location | default | Geographic point (GeoJSON) | Must be a valid location point |
media | file | A file from the DAM | Must reference an existing file |
media | image | An image from the DAM | Must reference an image |
media | video | A video from the DAM | Must reference a video |
group | default | A group of nested attributes | Each 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’svalidations):
| Data type | Appearance | Configurable rules |
|---|---|---|
text | short, long | min / max length, and a regular_expression |
text | list | options — the list of allowed values |
number | integer, spinner, slider | min, max, decimals, a display symbol ($, €, £, ¥, %), and a thousands separator |
date | date | min / max date |
media, location, boolean, datetime, time,
rating_stars, mjml, markdown, full_formatted, and phone — have no
configurable rules.
Related
Attributes
How attributes are defined, scoped, and used.