Define a validation rule for age questions

Age questions offer multiple validation rules to restrict answers and only accept specific values. The answer to an age-related question involves a number (the exact calculated age) and a date (the date of birth). For this reason you can add and combine number and date validations for an age question.

  1. For a given Age 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 available options for validation rules:
    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.
  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 number and date/time questions, if applicable. In the particular case of age questions, you can even combine number (Age) validation rules with date/time (Date of Birth) validation rules. 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.