A control that takes user input can have validation rules added to them. What is a validation rule? It is a requirement the user must follow in order for the control to accept the input.

Currently, there are only two controls that can have field validation rules set: the TextInput control and the Dropdown control. The Validation Rules can be accessed for each control by selecting the down arrow () on the control to open its contextual menu:

Doing so will open up the control's Validation Window. The below image is an example of the TextInput's validation controls. To add a rule to the control, you select it from the validation rule list on the right. Some rules require further configuration (e.g. the Minimum Field Length needs to know how many characters is required as minimum).

There are four validation rules a control may have (depending on the type of control):

  • Field is required - Validate that a field has been populated.
  • Field has a maximum length - Validate that a field contains a valid email address. Multiple addresses may be spearated by a comma. 
  • Field has a minimum length - Validate that a field does not exceed a certain number of characters.
  • Field contains a valid email address - Validate that a field is at least a certain number of characters.
  • Field Contains No Malicious Values - Validates the field does not contain malicious text (Javascript or SQL injections). HTML text is still allowed.

If a validation rule is added to a control, the action Validate Controls on Screen can be used to check if the object obeys these rules. The Save All action can also be configured to check validation rules before saving. 

If the input for the control breaks a rule, this action will highlight the field in red, display what needs to be fixed, and all other actions below this action will be ignored. 

Example: Below, the Name field is required and the action was called to validate this field. Since the field was empty, it was outlined in red and text is displayed to show what the validation error was. Any other action after this action is ignored.

Did this answer your question?