Fields
Each entity contains fields that define its data structure. ScaffoldHub supports 11 field types, each with its own validations and display options.
Common properties
All fields share these properties:
| Property | Description |
|---|---|
| name | Field name used in code (camelCase). |
| label | Display label shown in forms and tables. |
| hint | Help text displayed below the field in forms. |
Common toggles
| Toggle | Description | Default |
|---|---|---|
| Required | Field must have a value. | off |
| Unique | Values must be unique across all records. | off |
| List | Show field in the list/table view. | on |
| Filter | Allow filtering by this field. | on |
| Exportable | Include in CSV/Excel exports. | on |
Field types
Text
String field for short or long text.
Display options:
- HTML type —
input(single line) ortextarea(multi-line).
Validations:
minlength— minimum character count.maxlength— maximum character count.isEmail— validate as email address.isUrl— validate as URL.forceLowerCase— convert value to lowercase on save.forceUpperCase— convert value to uppercase on save.
Integer
Whole number field.
Validations:
min— minimum value.max— maximum value.positive— only allow positive numbers.negative— only allow negative numbers.
Decimal
Floating-point number field.
Validations:
min— minimum value.max— maximum value.positive— only allow positive numbers.negative— only allow negative numbers.scale— number of decimal places (e.g.,2for currency).
Date
Date-only field (no time component).
Supports required and unique validations.
Datetime
Date and time field.
Supports required and unique validations.
Boolean
True/false field.
Display options:
- HTML type —
switch,checkbox, orradio.
Enumerator
Single-choice selection from a predefined list.
Display options:
- HTML type —
select(dropdown) orradio(radio buttons). - Options — array of allowed values.
Enumerator multiple
Multiple-choice selection from a predefined list.
Display options:
- Options — array of allowed values.
Validations:
min— minimum number of selections.max— maximum number of selections.
Tags
Free-form tag input. Users type values separated by a delimiter.
Display options:
- Separator — delimiter character (default:
,).
Validations:
minlength— minimum length per tag.maxlength— maximum length per tag.min— minimum number of tags.max— maximum number of tags.isEmail— validate each tag as an email address.isUrl— validate each tag as a URL.forceLowerCase— convert tags to lowercase.forceUpperCase— convert tags to uppercase.
Files
File upload field. Supports multiple files.
Validations:
min— minimum number of files.max— maximum number of files.size— maximum file size in bytes.mimeTypes— array of allowed MIME types (e.g.,["application/pdf", "text/csv"]).
Files fields do not support the filter toggle.
Images
Image upload field. Supports multiple images.
Validations:
min— minimum number of images.max— maximum number of images.size— maximum file size in bytes.mimeTypes— array of allowed MIME types (e.g.,["image/png", "image/jpeg"]).
Images fields do not support the filter toggle.
Protected field names
Certain field names are reserved for internal use (e.g., id, createdAt, updatedAt, createdBy, updatedBy, organization). The modeling tool validates field names automatically and will show an error if you use a protected name.