Setting Validation rules

This section describes the steps for setting validation rules to a field when designing a Form.  You can define one or more rules for some specific types of fields to define when an added Record is valid. Adding validation rules to one or more fields prevents users from saving a Record that does not follow the validation rules. Adding validation rules to Reference fields limits the available answers that a user can select from.

You can base the validation rules on the fields of your Form or on a specific Formula. Writing a Formula for a validation rule allows you to set more advanced validation rules.

If you are using Reference fields in your Form you can add validation rules to limit the available options that a user can select from.

List of field types and conditions which can be used:

 

Field Type Condition
Text
  • Is
  • Is not
  • Starts with
  • Ends with
  • Contains
  • Formula is true + formula
Quantity
  • Greater than
  • Less than
  • Greater or equal to
  • Less or equal to
  • Is
  • Is not
  • Formula is true + formula
Date
  • Before
  • After
  • Is
  • Is not
  • Formula is true + formula
Week/Fortnight/Month
  • Before
  • After
  • Is
  • Is not
  • Formula is true + formula
Multi-line Text
  • Is
  • Is not
  • Starts with
  • Ends with
  • Contains
  • Formula is true + formula
Reference
  • Formula is true + formula
  • A field that has validation rules, appears with the label "VALIDATION RULE SET" in the Form Design page.
  • A field with validation rules can be a Key field.
  • A field with validation rules can be hidden.
  • A field with validation rules can also have relevance rules.
  • View all the available Formulas or read more about writing an expression for a Formula.

Please note when writing Formulas string comparisons are case sensitive.

Learn everything you need about Formulas in Validation and Relevance rules in our Webinar  "Using formulas in validation rules and relevance rules".

Do you wish to understand better Regular Expressions (RegEx) so as to use them in your Formulas in Validation rules? Make sure to check our Webinar "Learning Regular Expressions for validation rules and quality data".

How to set validation rules based on the fields of a Form
  • In the Form Design page click on the field to which you want to apply validation rules.
  • In the Field Card editor check the box next to "Set validation rules".
  • In the validation rules section that appears at the bottom of the tab you can start defining the rules.
  • You can select to  consider as valid the select field if all or any of the conditions are met. Click on the arrow next to "any" if you want to change it to "all".

Set the first validation rule by selecting:

  • the state of the condition
  • the condition
  • To add another validation rule, click on "Add" and set the rule by selecting what you want to apply.
  • Click on "Delete" to delete a validation rule.
  • Once you have added all the validation rules you need, click on "Done" to save the field.
  • You can add validation rules to more fields.
  • When you finish adding fields, click on "Save" to save the Form.
  • Users will get an error message with a description of the validation rule when they try to add a Record that doesn't meet the validation rule(s).
How to set validation rules using a Formula
  • In the Form Design page, click on the field you want to apply validation rules to.
  • In the Field Card editor, check the box next to "Set validation rules".
  • In the validation rules section that appears at the bottom of the card you can start defining the rules.
  • You can select to consider as valid the selected field if all or any of the conditions are met. Click on the arrow next to "any" if you want to change it to "all".
  • To start writing a Formula, select the 'Formula is true' option.
  • Next, you can either right your Formula on the rules editor or open the Formula editor to write a longer Formula and get more help.
  • Start writing your Formula and click on "Done" when you are ready to save it.

Please note that the Formula editor is case sensitive.

View all the available Formulas or read more about writing an expression for a Formula. Check our Webinar "Learning Regular Expressions for validation rules and quality data" to learn more about Regular Expressions in Formulas.

  • You can see the validation rules added in the editor.
  • Click on 'Done' to save the the field.
  • When you finish adding fields, click on "Save" to save the Form.
  • Users will get an error message with a description of the validation rule when they try to add a Record that doesn't meet the validation rule(s).
How to set validation rules for a Reference field
  • In the Form Design page,  add one or more reference fields to reference the Forms you want.
  • Click on "Save" to save the Form and open the Form once more, this is an essential step for your validation rule to work.
  • Click on the Reference field you want to apply validation rules to.
  • In the Field Card editor, check the box next to "Set validation rules".
  • In the Validation rules section that appears at the bottom of the card you can start defining the rules.
  • You can select to consider as valid the selected field if all or any of the conditions are met. Click on the arrow next to "any" if you want to change it to "all".
  • Next, you can either write your Formula on the rules editor or open the Formula editor to write a longer Formula and get more help.
  • Start writing your Formula and click on "Done" when you are ready to save it.

Please note that the Formula editor is case sensitive.

  • When you finish adding fields, click on "Save" to save the Form.