Hello.
How can we help you?

search icon
Categories
Close icon

How to Validate Open Text Responses

Published
1.31.2023

What is Text Validation?

The Single Line Text question allows you to add validation rules to help ensure that your respondents’ answers are formatted correctly and to help prevent data entry errors. When validation is added to your single line text questions, respondents will receive an error message if their responses don’t match the validation rules. Validation options include:

  • Date (MM/DD/YYYY or DD/MM/YYYY)
  • Alpha-numeric string
  • Letters Only
  • Decimal
  • Email Address
  • Integer
  • Money
  • Numeric Characters Only
  • Postal Code (US/Canada)
  • Phone Numbers (North America)
  • Social Security Number
  • String – Uppercase
  • String – Lowercase
  • URL
  • Custom Validation (RegEx)

To add standard validation to your Single Line Text questions:

1. Add a Single Line Text Question to your survey.


2. Under ‘Behavior’ select the answer format you want to enforce, such as ‘Email Address’.

3. Test this question to make sure it is operating the way you expected.

For example, if the respondent enters an invalid email address they will be notified of this error and have the ability to update their response. If they enter a valid email address format, they should be able to proceed in the survey.

*Important Note: Validation rules like Email Address and Phone Number will only validate that the format of the answer is correct, not that the answer is an actual email address or phone number.

To add custom validation  to your single line text questions via RegEx:

A Regular Expression pattern or RegEx pattern is a sequence of characters that is used to validate specific string formats. Choosing RegEx validation will allow you to create your own validation rules, such as validating a non-US phone number or postal code or an employee ID number in a certain range.

1. Add a Single Line Text Question to your survey.

2. Under Behavior select “Custom Validation” as your answer format.

Then enter your RegEx pattern and the validation message you’d like to appear in case the respondent’s answer doesn’t meet your specified format.

*Note that Checkbox is unable to help with custom RegEx patterns, but there are many resources online to help you with this.

3. Test this question to make sure it is operating the way you expected.

Related articles

No items found.