For the complete documentation index, see llms.txt. This page is also available as Markdown.

FormFieldValidationTypes

Introduction

FormFieldValidationTypes define validation rules that can be attached to FormFields.

Model Definition

Alias

formFieldValidationType

Attributes

Key
Type
Description

id

string

Stable validation type ID used by form_field_validation_type_id.

default_config

object

Source-defined starting config used when a validation of this type is created without an explicit configuration; required editor placeholders may still need values.

Available Form Field Validation Types

The following validation types are available in the current API version. Each entry combines the validation's meaning, complete source-defined default, and accepted configuration keys. The defaults are editor starting points and may contain required placeholders that must be replaced before submission. Dot notation identifies nested values; additional unlisted keys are not part of the public contract.

required

Default Config

{}

Requires a value. This validation accepts no configuration keys.

email

Default Config

Requires an address following the shared Email Addresses rules. This validation accepts no configuration keys.

phone

Default Config

Requires a valid number following the shared Phone Numbers rules. The configuration below controls country and number-category restrictions.

Configuration Keys

Key
Type
Requirement
Description

fixed_line

boolean

Optional

Select fixed-line numbers for the category restriction.

mobile

boolean

Optional

Select mobile numbers for the category restriction.

country_codes

array | null

Optional

Restrict numbers to supported ISO 3166-1 alpha-2 country codes.

country_codes.*

string

Optional

One supported country code.

default_country_code

string

Required

Supported country code preselected in the editor.

url

Default Config

Requires a valid URL. This validation accepts no configuration keys.

number

Default Config

Requires a numeric or integer value.

Configuration Keys

Key
Type
Requirement
Description

type

string

Required

Numeric rule: numeric or integer.

digits_only

Default Config

Allows ASCII digits only. This validation accepts no configuration keys.

minmax

Default Config

Restricts a value or length to a minimum, maximum, or both. At least one of min and max is required.

Configuration Keys

Key
Type
Requirement
Description

min

integer

Required when max is omitted

Minimum accepted value or length, depending on the field value type.

max

integer

Required when min is omitted

Maximum accepted value or length, depending on the field value type.

items-count

Default Config

Restricts the number of selected items. At least one of min and max is required.

Configuration Keys

Key
Type
Requirement
Description

min

integer

Required when max is omitted

Minimum number of selected items.

max

integer

Required when min is omitted

Maximum number of selected items.

boolean

Default Config

Requires a boolean-compatible value. This validation accepts no configuration keys.

datetime

Default Config

Requires a date and time matching a server-side format.

Configuration Keys

Key
Type
Requirement
Description

format

string

Required

Server-side date format used to validate the submitted value.

after-before

Default Config

Restricts a date to a lower bound, upper bound, or both. At least one of after and before is required.

Configuration Keys

Key
Type
Requirement
Description

after

string | integer

Required when before is omitted

Relative or absolute date, such as now, or a Unix timestamp. The submitted value must be later.

before

string | integer

Required when after is omitted

Relative or absolute date, such as now, or a Unix timestamp. The submitted value must be earlier.

file

Default Config

Requires an uploaded file. This validation accepts no configuration keys.

mimetypes

Default Config

Restricts an uploaded file to configured MIME types.

Configuration Keys

Key
Type
Requirement
Description

allowed

array

Required

MIME type strings accepted for an uploaded file. An empty array applies no MIME-type rule.

allowed.*

string

Not individually validated

One MIME type consumed by the file validator.

last-modified

Default Config

Restricts a file's modification date to a lower bound, upper bound, or both. At least one of after and before is required. Clients evaluate this validation; the backend stores and validates the config but does not apply a server-side file-date rule.

Configuration Keys

Key
Type
Requirement
Description

after

string | integer

Required when before is omitted

Relative or absolute date, such as now, or a Unix timestamp. The file must have been modified later.

before

string | integer

Required when after is omitted

Relative or absolute date, such as now, or a Unix timestamp. The file must have been modified earlier.

in

Default Config

Allows only configured values. The array must contain at least one item; the source-defined empty default is not a valid submitted config until populated.

Configuration Keys

Key
Type
Requirement
Description

values

array

Required

Allowed values.

values.*

mixed

Not individually validated

One compared value.

not-in

Default Config

Rejects configured values. The array must contain at least one item; the source-defined empty default is not a valid submitted config until populated.

Configuration Keys

Key
Type
Requirement
Description

values

array

Required

Rejected values.

values.*

mixed

Not individually validated

One compared value.

entity-selection

Default Config

Requires either a single-entity or multiple-entity selection.

Configuration Keys

Key
Type
Requirement
Description

multiple

boolean

Required

Require a multiple-entity value when true; otherwise require a single entity.

regex

Default Config

Requires a value matching a valid regular expression. The source-defined empty default is not a valid submitted config until populated.

Configuration Keys

Key
Type
Requirement
Description

pattern

string

Required

Regular expression applied to the submitted value.

List

List available FormFieldValidationTypes.

Definition

GET /api/forms/field-validation-types

Example Request

Example Response

Show

Show one FormFieldValidationType.

Definition

GET /api/forms/field-validation-types/{formFieldValidationType}

Route Parameters

Parameter
Type
Description

formFieldValidationType

string

Validation type ID from Available Form Field Validation Types.

Example Request

Example Response

Last updated