Skip to content

Required Field Validation

A Required validation makes a Form Field mandatory: the end user must provide a value before they can continue navigating or submit the Factorial Form.

Unlike a Regex validation, which checks the format of the value, a Required validation only checks that something has been entered.

When to use it

Use Required validation to guarantee that essential information is always captured, for example:

  • A customer's first and last name
  • An email address or phone number
  • A mandatory acceptance checkbox
  • Any other value that is needed on every record

How to configure it

The Required validation is configured on the Form Field's Validations tab in the field properties drawer. Refer to Manage Fields for how to open the drawer.

  1. In the Validations tab, turn on the Required toggle.
  2. Enter a message in the Required Validation Error Message text box. This message is shown to the end user whenever the field is left empty.

Error message placeholders

The error message can include the special placeholder {0}, which is replaced with the field's label when the message is displayed. For example, an error message of "{0} is required" is shown as "First Name is required" (or whatever the field label is).

What the end user experiences

  • When the end user tries to advance to the next page, any empty field that is marked Required blocks the navigation and the error message is displayed next to the field.
  • The field is highlighted so it is easy to spot on the page.
  • An error summary is shown at the top of the page listing every field that must be corrected, with links that jump straight to the offending field.
  • The form cannot be submitted until all Required validations pass.
  • If the field is configured with Bypass Validation, the user may continue to the next page but will still be blocked from submitting the form.

Things to know

  • Required validation applies to all standard field types (see Standard Field Types) as well as file and image upload fields.
  • For checkbox and radio groups, the field is considered filled in when an option has been selected.
  • A Required validation only fails on an empty value. A value made up only of spaces (for example " ") counts as filled in — use a Regex Validation pattern (such as ^\S+( \S+)*$) when the field must contain at least one non-space character.
  • A Required validation always runs — it cannot be made conditional. Use Conditional Validation when a field should only be mandatory under certain conditions.