Skip to main content

Form builder validation

How to make fields required and add validation rules to fields in the Onboard B2B form builder.

Every input field has a Validation section where you can control which responses are accepted.

Required fields

Check the Required checkbox to make a field mandatory. You can also customize the error message shown when the field is left blank.

Adding validation rules

Click “Add validation rule” to add custom rules beyond the required check. Each rule has a qualifier, a comparison value, and an error message displayed when the rule is violated. Available qualifiers depend on the field’s data type:

Field data type

Available qualifiers

Text

equal, not equal, blank, not blank, contains, shorter/longer than x characters, starts with, ends with, matches regex

Number

more/less than, more/less than or equal, equal, not equal, blank, not blank

Email

valid email address, domain must (not) equal

Phone

must be valid

Date

valid, more/less than, on, after, on or after, before, on or before, on day/month/year

Checkbox

must be true / false

Multi-choice

contains, does not contain, select exactly / more than / at least / less than / at most x choices

File

blank, not blank, smaller/larger than, valid extension, extension must (not) be

A few things worth knowing

Comparison values can reference another field on the same form, which is useful for cross-field validation. Regex patterns are screened on save to prevent catastrophic backtracking. Some built-in validations can't be removed: valid email, valid phone, valid date, and, for file fields, the 20MB size limit and valid extension check.

For how to add, edit, and arrange fields, see Using the form builder.

Did this answer your question?