Define a validation rule for number and age questions

Number questions offer multiple validation rules to restrict site users to only enter specific numeric characters.

The answer to an age-related question can be a number (when you're asking a subject to specify their exact age) or a date (when you're asking a subject to specify their date of bith). To set a validation rule related to the age value, see Define a validation rule for number and age questions.

You can define more than one validation rule for a number or age question, if applicable. For age questions you can combine Age validation rules with Date validation rules.

Repeat the steps to add new rules as required and, once you have added the new rules, select a logical operator from the drop-down between rules:
  • If you select AND, the value must be valid for every validation rule.
  • If you select OR, the value must be valid for exactly one validation rule.
  1. Go to the Rules sidepanel as described in Access the Rules section.
  2. On the Rules sidepanel, select Add Rule.
  3. From the drop-down, select Age, and choose one of the following validation rules:
    Validation rule type Description
    Greater Than A site user must enter a number that is greater than the specified value.
    Greater Than or Equal To A site user must enter a number that is greater than or equal to the specified value.
    Less Than A site user must enter a number that is less than the specified value.
    Less Than or Equal To A site user must enter a number that is less than or equal to the specified value.
    Is A site user must enter a number that is exactly the specified value.
    Not Equal To A site user must enter a number that is not equal to the specified value.
    Not Between A site user must enter a number that is not between the specified range of values.
    Range A site user must enter a number that is between the specified range of values.
    A Validation Rule dialog appears.
    Screen shot of the settings for a Date/Time validation rule.
  4. Enter values according to the type of validation rule:
    Option Description
    For rules of the following type:
    • Greater Than
    • Greater Than or Equal To
    • Less Than
    • Less Than or Equal To
    • Is
    • Not Equal To
    Set a comparison value.
    For rules of the following type:
    • Not Between
    • Range
    Set lower and higher range limits.

    If required, select Include Value in Range to specify that the limits should be included in the comparison range.

  5. In the Error Message field, enter an error message that should appear for site users when the answer is invalid.