A Validator question can validate the responses of other questions by comparing expected values to the to given values.
You can define any number of "comparisons" with other questions, If these comparisons fail, then an error message will be displayed on the form.
These comparisons can take many forms and a very useful concept for this is 'Regular Expressions' or 'RegEx'.
|Message||Type in the Message you want to display.|
|Question||A reference to another question/answer on the form to check|
|Type||Options are: Compare Field Length Regular ExpressionCompare - The options for this property will change based on the "Type" selected. It gives you the options available for your comparison. A "Field Length" type only has Minimum field length and Maximum field length; whereas a "Compare" comparison has a number of options.Field Length - A "Field Length" type comparison checks the actual length of the entered value. For example, it could be used to check that a "Name" field is less than 50 characters long. Regular Expression - Use a "Regular Expression" type comparison to validate that the value of a reference question/answer matches an entered regular expression. For example, it could be used to check that a value is a valid email address.|
|Comparison||The options for this are: Greater Than Greater Than or Equals Less Than Less Than or Equals Equals Not Equal To Begins With Ends With Contains Doesn't Contain|
|Expression||Type in the text that you are wanting to validate against.|
|Add||Once all the settings are correct, use the Add button to add it to the validation box.|
|Update||If you make changes to existing settings you can select update to keep the changes.|
|Remove||If you want to remove an existing validation, select it in the box and choose Remove.|
For more complex situations, multiple rules may need to be grouped together. From left to right of the rule controls; copy, paste, move selected up, move selected down, new 'all of', new 'any of', and switch selected group between 'all of' and 'any of'
An ‘all of’ group of rules is only satisfied if all of the rules in that group are met. If any one of them are not met, the answer is deemed irrelevant. Inversely, an ‘any of’ group needs only one of its rules to be met for the group of rules to be satisfied, making that answer relevant.
If you need your form project to capture numbers that must have a specific number of decimal places, you can add Regular Expression validation in Design. The following regular expressions will validate to the noted number of decimal places:
Updated 2 months ago