Define a validation rule for text questions

For text questions, you can only create validation rules that restrict the entry of non-alphabetic characters.

  1. For the given text question, go to the Rules side panel as described in Access the Rules section.
  2. On the Rules side panel, select Add Rule, then select Doesn't Contain from the drop-down.
    A container for the given Validation Rule is listed in the Rules side panel, whichis auto-populated with Numbers, and restricts the question to only alphabetic characters. You must configure the rule definition within this container.

    Note:

    This is the only validation rule option that is available for text questions.
  3. 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.
  4. 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.
  5. Click Save or Save and Close to save the form changes.