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:

PropertyDescription
nameField name used in code (camelCase).
labelDisplay label shown in forms and tables.
hintHelp text displayed below the field in forms.

Common toggles

ToggleDescriptionDefault
RequiredField must have a value.off
UniqueValues must be unique across all records.off
ListShow field in the list/table view.on
FilterAllow filtering by this field.on
ExportableInclude in CSV/Excel exports.on

Field types

Text

String field for short or long text.

Display options:

  • HTML typeinput (single line) or textarea (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., 2 for 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 typeswitch, checkbox, or radio.

Enumerator

Single-choice selection from a predefined list.

Display options:

  • HTML typeselect (dropdown) or radio (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.