Validating input type questions checks a user's answer to determine if it conforms to the defined requirements. 

The following types of validation are available:

  • Custom: This validation type is provided for text input questions (both Short Text and Multiline). The validation involves checking whether the answer is consistent with requirements defined in a regular expression (RegEx).
  • Range: This validation type is provided for number input questions. The validation involves checking whether the number entered by the user is within a defined range. 

For both types of validation, you can specify a message that will be displayed to users whose answers do not pass the validation test. In the following example, the user entered input that was inconsistent with the format of an email address:

Setting Custom Validation 

Configuring custom validation settings is part of designing a text input question. You set text validation using a regular expression. For example, you can limit the text input to match only an email address format, or ensure use of numbers or capital letters.

  1. Open the Page Editor of the relevant text input question, and select the Element tab.
  2. From the Validation Type dropdown list, select Custom




    Custom validation parameters are displayed.

  3. In the Regular Expression field, enter the desired regular expression:

  4. If desired, in the Error Message field, enter text that will be displayed to users who enter an invalid answer.
  5. To save your changes, at the lower right corner of the Page Editor, click Update Page.
    The Page Editor closes, and the Interaction Map is displayed.

Setting Range Validation 

Configuring range validation settings is part of designing a number input question. Setting the validation involves specifying the relevant range and defining an error message.

  1. Open the Page Editor of the relevant number input question, and select the Element tab.
  2. From the Validation Type dropdown list, select Range



    Range validation parameters are displayed.

  3. Define the required range: 


    • In the Lower Limit field, enter the lowest valid number in the range. Alternatively, use the yellow Up/Down arrow buttons to navigate to the lower limit.
    • In the Upper Limit field, enter the highest valid number in the range. Alternatively, use the yellow Up/Down arrow buttons to navigate to the upper limit.

  4. If desired, in the Error Message field, enter text that will be displayed to users who enter an invalid answer.
  5. To save your changes, at the lower right corner of the Page Editor, click Update Page.
    The Page Editor closes, and the Interaction Map is displayed.

 

Revision:

Comments