Validation

Difficulty level: Difficult

What does the functionality do?

A validation enables you to validate the answers of survey participants, i.e. to ensure that the answers are plausible. This implies that you can check whether the answer is meaningful and whether it makes sense. The operation is similar to that of a filter in Survalyzer.

Use case and how to set it up?

You can include a validation element, for example, after a question in the survey (e.g. q1); this then concerns the question to which the validation relates. You can then immediately test the answers provided by the participant. Suppose you want to implement the condition(s) for the question (in the image above) that a participant can only select up to 3 cities from the answer options, you can then add a validation element for this question.

If you click on the inserted validation in the survey, you can define the error message and the condition(s) on the right side of the screen.

The error message is the message the participant receives when he/she does not comply with the specified condition(s). For example, if the participant selects more cities than stated in the condition(s), this error message will be displayed and he/she can only continue the survey after he/she has selected the allowed number of cities.

Once you have clicked the Edit conditions button, the Filter window will appear allowing you to indicate under which condition(s) an error message should be presented to a participant. For example, if a participant is only allowed to select three cities from a question, you might assume that the error message should NOT be displayed, if a participant selects 1, 2 or 3 cities from the answers. This could be set up as follows:

  • Hide this validation message
  • If – Question – q1 – Number of selected options – smaller than or equal to – 3

After you have completed the set-up, you still have to click the Save changes button.

Validations can be set up for more than just questions; you can also verify the data of sample, custom and URL variables. In addition, you can validate answers related to the device or language used. Finally, you can calculate various values and validate them on plausibility.

Suppose you ask a teenager how much pocket money he/she receives each month (q2). Subsequently, you would like to know how much of that pocket money the teenager spends on video games (q3). Now you have two separate questions, but question q3 is closely related to question q2. In order to validate the values, you can run a calculation whose result must be validated.

At the error message (right), you indicate that the amount entered in question q3 CANNOT be greater than the amount entered in question q2. Under the condition, you indicate that the error message will NOT be shown, for example, if the amount specified in question q3 is smaller than the amount specified in question q2.

In short, it looks like this:

  • Hide this validation message
  • If - Calculation - q3 - smaller than - q2

You can use this validation to ensure that the amount in question q3 will not be greater than the amount in question q2.

Suppose you ask a participant to enter a code twice for verification purposes. These two codes must be identical. You can obviously achieve this by means of a value assignment. You can use the function equals(q1,q2) which returns the result true or false. Suppose the participant enters the code 261 for question q1 and the same code for question q2, the result will then be true.

In this case, for example, you would want a validation message to be shown to a participant if the result were to be false. After all, this would imply that the corresponding participant entered two different codes in question q1 and question q2.

At the error message (right) you now indicate, for instance, that the code entered in question q1 must be identical to the code entered in question q2. Under the condition (see image below) you then indicate that an error message must be displayed, for example, if the comparison between the two codes entered by the participant reveals that they are NOT identical.

For example, you can set it up as follows:

  • Show this validation message
  • If - Custom variable - Compare - equals sign - false

Note: Compare is the name invented for a custom variable; you can, of course, specify an alternative name.

You can use this validation to ensure that the code entered in question q1 will be identical to the code entered by the same participant in question q2.

Updated on November 16, 2022

Was this article helpful?

Related Articles

Need Support?
Please login to your Survalyzer account and use the "Create Support Request" form.
Login to Survalyzer