Conditional Validation
A Conditional validation only enforces a Form Field's other validations when one or more conditions are satisfied. When the conditions are not met, the field is not validated — even if it is marked Required or has a Regex pattern.
For example, a "Company Name" field could be required only when the user selects "Company" as their account type, and completely optional when they select "Individual".
When to use it
Conditional validation is useful to avoid asking for information that is only relevant in certain situations:
- A field that is only mandatory for some business scenarios
- Requiring a credit check reference only when the customer applies for credit
- Requiring a passport number only when a foreign ID type is selected
- Making a section of the form relevant only when a specific option is chosen
How to configure it
The Conditional 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.
- In the
Validationstab, turn on theConditional Validationtoggle. - Enter a message in the Conditional Validation Error Message text box. This message is shown to the end user when the conditions are met but the field is left without a valid value.
- Under Conditions, define the condition(s) that must be satisfied for the field's validations to apply.
Defining conditions
Conditions are built exactly like the conditions used for UI rules — see Manage Conditional Rules for the full walkthrough.
- Choose the field whose value drives the condition (with an optional sub-attribute for fields that reference another record).
- Choose the operator (for example equals, not equals, contains).
- Choose the value to compare against — either a fixed value you type in, or the value of another field.
When more than one condition is added, all conditions must be satisfied ("and" logic) for the validation to apply.
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 for corporate accounts" is shown as "Company Name is required for corporate accounts".
What the end user experiences
- When the conditions are met, the field behaves exactly as if the validation were unconditional: the field is highlighted and the error message is shown until the value is valid, and the form cannot be submitted.
- When the conditions are not met, the field is not validated at all — it is treated the same as a normal optional field.
Things to know
- Conditional validation gates the field's other validations (Required, Regex, Min/Max) — it is not a validation itself. Configure the actual validation rules (for example Required) in addition to the Conditional rule.
- When conditions reference values on another page, the condition is evaluated against whatever has been filled in up to that point. Values on pages the user has not yet visited count as empty, so a condition that depends on those values is treated as not met.
- Conditional validation combines with Bypass Validation: if the conditions are met and the value is invalid and Bypass is on, the user may continue to the next page but will still be blocked from submitting the form.
Conditions based on child section rows
In Conditions, choose Child Section Rows to compare Total Rows, Filled Rows, or Blank Rows for a selected child section with a whole number. These measures use the same meanings as conditional UI rules. For example, a field can become required when Filled Rows is greater than or equal to 1. Conditional validation still controls when the field's other validations apply; it does not validate the child rows themselves.