SurveyMonkey

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
  • Date/Time

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.

To validate a textbox question:

  1. Click an existing question to edit it. Or, add a new Single Textbox or Multiple Textboxes question to the survey.
  2. Click the Options tab.
  3. Click Validate Answer for a Specific Format.
  4. 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, name@company.com. It doesn't verify if the email address is valid.
  5. (Optional) Write a custom error message to help people fix their answer if it's in the wrong format.
  6. Click Save.

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:

  1. Click an existing question to edit it. Or, add a new Multiple Textboxes question to the survey.
  2. Under the Textboxes labels, select the Only Allow Numerical Data checkbox.
  3. (Optional) Customize the Number Validation Message.
  4. Click Save.

To validate a Date/Time question to only collect dates in a specific format:

  1. Click an existing question to edit it. Or, add a new Date/Time question to the survey.
  2. Next to Collect, select Date Info.
  3. The options to choose between MM/DD/YYYY and DD/MM/YYYY format will appear to the right. Select the preferred format.

If people enter the wrong date format, they’ll see a message letting them know how to fix their answer. It’s not possible to customize this message.

TIP! To validate a date range, use the Single Textbox or Multiple Textboxes question type.

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