Types of validation rules

Create a validation rule for any type of question in a form when you want to verify that answers to a specific question meet the study requirements.

Validation rules are useful when you want to block site users from entering unaccepted values to answer certain questions. Depending on the type of question you are working with, different options for a validation rule are available.

If applicable, you can define more than one validation rule for a question, but only for question types that have more than one validation rule options: Date/Time, Date of birth, number, age, drop-down, and checkbox questions. To do this you must select a logical operator:
  • 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.

These operators cannot be combined if more than two validation rules are configured. For example, if you have three validation rules on a question, you can select AND for every rule instance or OR for every rule instance, but you cannot select AND followed by OR.

Question type Validation rules Use cases
Text question
  • Doesn't contain
  • Number of allowed characters (up to 4,000).
  • Type of allowed values (either alphanumeric or text only).
Date/Time questions
  • After
  • On or After
  • Before
  • On or Before
  • On
  • Not On
  • Not Between
  • Range
  • Format for collecting date and time.
  • Allowed date range.
Number and Age questions
  • Greater Than
  • Greater Than or Equal To
  • Less Than
  • Less Than or Equal To
  • Is
  • Not Equal To
  • Not Between
  • Range
Age questions
  • Acceptable range of numbers for age.
  • Allowed date range for date of birth.
Number questions
  • Number of values allowed after the decimal point.
  • Unit of measurement.
  • Acceptable range of numbers.
Drop-down questions and questions with checkboxes
  • Select at Least
  • Select at Most
  • Select Exactly
  • Answer Must Be
  • Number of options to select in a drop-down list.
  • Answer that users must select to continue with the visit.
Questions with radio buttons
  • Answer Must Be
  • Answer that users must select for screening requirements.
  • Answer that users must select for entering a rollover study.

For further details about how to set validation rules for a specific question type, browse the sections below: