Sometimes in surveys, you may want to prevent a participant from proceeding if they have answered a question incorrectly. This may be particularly useful in the context of consent surveys, in which you might not want a participant to proceed unless they satisfy various eligibility criteria.
Adding Validation Rules
To set up validation for a step in the survey editor, go to the validation tab for the step you would like add validation for. Note that you cannot add validation rules to the last step of your survey.
Validation rules are set up similarly to navigation rules and use the same conditional editor.
When you have selected the validation tab for a particular step, click the “Add Validation Rule” button to start adding a validation rule.
You can then set up a condition. For instance, if the step “IS_OVER_18
” has the answer “NO,” you can then enter a message to be displayed if the condition evaluates to true—for example, “You must be over 18 to participate in this study.”
You can set up as many validation rules as you want on a single step. When a participant completes this step, the validation rules will be evaluated in order until one evaluates to true, in which case the message for that rule will be displayed. If none of the validation rules evaluate to true, the participant will be allowed to continue to the next step.
Compound Conditions
You are not restricted to a single conditional when editing a validation rule. By clicking the “AND”, “OR,” and “NOT” buttons you can combine or negate the various conditions.