Validating Open-Ended Text Fields
You can validate the following open-ended question types to require that respondents enter their answer(s) in a specific format:
- Single Textbox
- Multiple Textboxes
Validating the Answer Format
You can validate the Single Textbox or Multiple Textboxes question type to only allow answers that are formatted in a specific way.
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 - Respondents must enter an answer between a specific character range.
- A whole number - Respondents must enter a whole number within a specific number range.
- A decimal number - Respondents must enter a decimal number within a specific number range.
- A date (MM/DD/YYYY) - Respondents must enter a date in MM//DD/YYYY format, within a specific date range.
- A date (DD/MM/YYYY) - Respondents must enter a date in DD/MM/YYYY format, within a specific date range.
- An email address - Respondents must enter an email address. NOTE: There is no way to validate that respondents have entered a valid email address. It will only detect whether or not their answer is in the format of an email address.
- Click Save.
NOTE: Comment Box question types cannot be validated.
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.
- Customize the Number Validation Message (optional).
- 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