Using validation rules
December 21, 2021
Validation rules can be set on any input field in your form. They allowyou to specify a variety of constraints on the values accepted by the input field, including whether the field is required to submit the form. When multiple validation rules are available it is possible to select multiple rules.
Text Input Field
Jahia default text input field has 5 available validation rules that you can use to guide users of your forms and improve the quality of data you capture
- Required allows you to make the field input mandatory
- Equal To allows you to compare the input value to another value in the form, but can only be when at least one other field is present on the form
- Number of Characters is an important constraint when you are planning to push the data from your forms into other systems as some downstream systems will have limitations on the number of characters accepted.
- Range is another useful parameter, but only applies to numeric values for this input, the numeric values captured will be stored as string. Jahia added dedicated numeric and phone input types in Forms 3.3.
- Regular Expression is the most powerful and specific of the built in validation rules for this input field, allowing you to specify the format of value accepted