Validating Open-Ended Text Fields
You can validate the following open-ended question types to require that people enter their answer in a specific format:
- Single Textbox
- Multiple Textboxes
It's not possible to add answer validation to a Comment Box question type.
Answer validation is triggered when a survey taker clicks the Next or Done button at the bottom of the survey.
Validating a Textbox Question
To validate a textbox question:
- Click an existing question to edit it. Or, add a new Single Textbox or Multiple Textboxes question to the survey.
- Click the Options tab.
- Click Validate Answer for a Specific Format.
- Choose from the following validation options:
- A specific length - Answers must be between a specific character range.
- A whole number - Answers must be a whole number within a specific number range.
- A decimal number - Enter a decimal number within a specific number range.
- A date (MM/DD/YYYY) - Choose a date in MM//DD/YYYY format, within a specific date range.
- A date (DD/MM/YYYY) - Choose a date in DD/MM/YYYY format, within a specific date range.
- An email address - This checks that their answer is in the format of an email address. For example, email@example.com. It doesn't verify if the email address is valid.
- (Optional) Write a custom error message to help people fix their answer if it's in the wrong format.
- Click Save.
Only Allowing Numerical Data
You can quickly validate the Multiple Textboxes question type to allow only numerical data (positive whole numbers), and to reveal the option to require a fixed sum.
To only allow numerical data for a Multiple Textboxes question:
- Click an existing question to edit it. Or, add a new Multiple Textboxes question to the survey.
- Under the Textboxes labels, select the Only Allow Numerical Data checkbox.
- (Optional) Customize the Number Validation Message.
- Click Save.
Validating a Date/Time Question
To validate a Date/Time question to only collect dates in a specific format:
- Click an existing question to edit it. Or, add a new Date/Time question to the survey.
- Next to Collect, select Date Info.
- The options to choose between MM/DD/YYYY and DD/MM/YYYY format will appear to the right. Select the preferred format.
- Customize the Date Validation Message to be specific about how respondents must format their answer.
"Other" Textbox Validation
If you add an "Other" textbox to a close-ended Multiple Choice, Dropdown, or Matrix question, you can validate that field to require respondents to enter their answer in a specific format. Learn more: Validating "Other" Textboxes