This feature allows you to avoid accidental or invalid answers, especially in numeric questions (Integer or Decimal response types). However, validation can be used on any question. Validation criteria are also sometimes referred to as constraints.

For example, if you want to restrict a question about age to numbers between 0 and 130.

How to add validation criteria

To add validation criteria for a specific question, go to Settings, then Validation Criteria.

Criteria: Write your validation criteria in XLSForm syntax (see examples below) Error Message (optional): This is the message your interviewer sees when they enter an invalid response.

Example Validation Criteria

Note that in the validation criteria syntax, . refers to the current question. ${some_question} refers to the fixed Name of a question, which needs to be set in the Question Options and then surrounded by ${}.

Examples of More Advanced Validation Criteria

There are many other combinations possible, including advanced mathematical calculations. See here for more details.

Did this answer your question?