The Validate input provides the ability to perform flexible data validation and prevents incorrect data submission. For example, this could be performed on a Date of Incident field, where the validation checks that the date entered is a past date.
When to use
You can add this rule:
- to a field
- to a form
- to a process (the rule will run on load)
How to get started
To showcase the Validate input rule in action, we will make a validation check on a Date of Incident field to see if the entered date is a past date.
To implement the rule:
Click on an existing process by going to Administration > Designer and decide which form, or field you will apply the rule to, by clicking on that item so that it is in edit mode so you can see the Edit/pen button, Pen button .
Click on Add a rule > Form actions > Validate input.
In the Edit rule - Field display mode dialog box, give the rule a title in the Title field.
Click on Edit conditions to add a validation condition. To learn more about conditions go to Conditions.
Select the field you want the condition check to be performed on. In this example it is the Date of Incident field.
Select type of validation to be performed. In this example it is the Is After Today validation.
In the Edit rule - Validate input dialog box, In the Error message to display when rule conditions above apply text box, type in the error message you want to be displayed if validation condition apply.
Select a form or field to Trigger rules if validation condition apply so that rules attached to that particular form or field are initiated if the condition(s) set in step 6 apply.
For example if the Submit button is selected in this field, all its rules will be executed which means the Submit process, Save process and Close rules will be executed after a condition is met.
From the example mentioned above, we created a simple Incident Form in which a user needs to select a date of an incident. The image below displays the Validate input rule in action, where the date selected Is After Today therefore the condition is valid and an error message is displayed.
Editing, deleting or duplicating rules
When you have clicked on an existing rule, and the rule is visible in the right-hand pane under Rules, there are a number of options available to you.
To disable a rule click the slider across beside the rule name.
To copy a rule, click on the Duplicate button beside the rule name.
To delete a rule, click on the Bin/Trash button .
To view a rule, click on the rule name to open the Edit rule dialog box.
- When validating a field, form or a process, think of conditions. When a condition is met, an action must follow. For example an error message is displayed (Action) when the wrong date is entered (Condition).
To find our more about other form action rules go to Form Action rules.
To find out more about other rules go to Rules.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.