Validation can be configured to check data as it is being entered and before completing an Actionflow. This could be from simply checking if a field has been completed, to checking for duplicate records.
Validation is checked for the following events:
When a user submits their data via a form e.g. saves the data (Default)
On Blur, which means once a user leaves a field
When an existing record is loaded
Applying Validation
We recommend validation is applied at the table level to attributes as it is then automatically applied everywhere the attribute is used, see Adding Validation to Table Attributes. However, where a form field is backed by a relational attribute, the validation set on the table attribute is not used.
For applying pre-set validation (e.g. mandatory, min/max length) to form fields on screens, see below, and for bespoke validation, see Custom Validation.
Table of Contents
Form Field Validation
Video Tutorial
Form Field Validation - Mandatory Field
Setting a form field as mandatory.
Right-click on the form field you would like to set as mandatory and choose SetValidation
The properties will open on the right, scroll down to the Validation section
Click on the tickbox next to Mandatory
Then toggle this on
Apply your changes
If you are using the Serene Grey Template, the following will be seen:
The form field header text will show with an asterisk *
The form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form
For True/False (Boolean) fields, only Mandatory is available. When set, validation will fail if the field is set to false and an error will show.
Form Field Validation - Minimum/Maximum Length
Right-click on the form field you would like to set a minimum or maximum length for and choose SetValidation
The properties will open on the right, scroll down to the Validation section
Click on the tickbox next to Validation Type
Next to Validation Type, click
A validation type can also be selected from the drop-down, if the desired validation exists, or edited by clicking the Validation Type hyperlink
Name, this should be indicative of its purpose. For example, minimum name length
Base Type, select the type of data. For example, different data types have different parameters such as numbers specifying the maximum value
Minimum Length (optional), sets the minimum number of characters. For example, 2
Maximum Length (optional), sets the maximum of characters. For example, 150. If left blank there is no maximum
Error Message (optional), enter a custom message or leave blank for the default message. This is shown when the field fails the validation check and you mouseover the field
Apply your changes
If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form
Form Field Validation - Matching a Given Pattern
Right-click on the form field you would like to set a pattern match for and choose SetValidation
The properties will open on the right, scroll down to the Validation section
Click on the tickbox next to Validation Type
Next to Validation Type, click
A validation type can also be selected from the drop-down if the desired validation exists or edited by clicking the Validation Type hyperlink
Name, this should be indicative of its purpose. For example, minimum name length
Base Type, select String
Pattern, define a pattern the input must adhere to in the form of a regular expression. Pattern examples are provided at the end of this section
Apply your changes
If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form