Define a validation rule for number questions

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

  1. For a given number question, go to the Rules side panel as described in Access the Rules section.
  2. On the Rules side panel, select Add Rule.
  3. From the drop-down, select 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 container for the given Validation Rule gets listed in the Rules side panel. You configure the rule definition in this container.
  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. Configure the Validation and Create a Query toggles.
    • Enable the Validation toggle to evaluate and accept a provided answer only if it meets the rule condition. If it does not, this configuration blocks the user from carrying out the Randomization and Trial Supply Management (RTSM) actions (randomization, dispensation, and screening) until the question is changed to a value that meets the validation criteria.
    • Enable the Create a Query toggle to instruct the system to raise a query when the answer provided does not meet the criteria. This configuration does not prevent the user from processing RTSM actions.
    • Enable both the Validation and Create a Query toggles to evaluate and accept a provided answer only if it meets the rule condition and to raise a query if it does not. If the rule conditions are not met, RTSM actions are blocked, but the user can resolve the validation error either by data update or by closing the query, allowing the RTSM actions to proceed.
    For more information see About validation rules.
  6. In the Error/Query Message field, enter an error message to display when the answer does not meet the criteria.
    The error message appears for site users as a floating dialog when an answer is missing or does not meet the criteria. For rules that are configured to trigger a query, this message is included as the query text.
  7. Click Save or Save and Close to save the form changes.
You can define more than one validation rule for a number, if applicable. Repeat these steps to add new rules as required and 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.
For more information see About multiple validations.