When you are configuring a Text Input question on your survey, you can enforce character restrictions/patterns to ensure respondents enter their text responses in the correct format.
If a specific format is required on your Text Input field, select the type of validation you would like to apply.
Preconfigured validation options include:
- Alphabetic: Letters only, with the option to set min/max characters allowed
- Numeric: Numbers only, with the option to set min/max characters allowed
- Alpha-Numeric: Letters and/or numbers, with the option to set min/max characters allowed
- Email: A properly formatted email address
- Phone (US/CA): A 10 digit phone number entered in the format (###)###-####
- Postal Code (CA): A postal code entered in the format A1B 2C3
- Zip Code (US): A zip code entered in the format 12345-6789 or 12345
- Postal/Zip Code (US/CA): A postal code or zip code entered in the correct format

If none of the preconfigured options meet your requirements, you can choose to add a custom validation.
For example, you may be collecting a reward program membership number, or similar, that must be entered in a specific format.
For custom validations, you will need to enter the required format in the field provided using Regex patterns.

![]() |
Regex stands for “regular expression”. A regular expression allows you to create a custom pattern made up of specific characters (either a single character or a range of approved characters) to validate user input into your survey. It allows for data standardization, and helps ensure that the responses that are collected are in the correct format. |
You can enter any regular expression to restrict and validate the data entered in a text field, however an incorrectly formatted regular expression may cause issues for your respondents, so always test/validate your regex before distributing your survey.
Examples of commonly used formats for custom/Regex validations:
- Membership Card Number (16 digits in total, no spaces, format ################, can be used with a mask on the field): ^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$
- Membership Card Number (16 digits in total, with spaces, format #### #### #### ####, can be used with a mask on the field): ^[0-9][0-9][0-9][0-9 ][0-9][0-9][0-9][0-9 ][0-9][0-9][0-9][0-9 ][0-9][0-9][0-9][0-9]$
- Membership Card Number (16 digits in total, with dashes, format ####-####-####-####, cannot be used with a mask on the field): ^[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$
- Membership Card Number (16 digits in total, with dashes, starting with 1111, format 1111-####-####-####, cannot be used with a mask on the field): ^1111-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$
- Military time (24H clock): ^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$
- Match only alphabetic characters: ^[a-zA-Z]+$
- Remove all non-letter, non-number, allow spaces: ^[a-zA-Z0-9 ]+$
- Allow English characters only: ^[A-Za-z0-9'\.,&@:;?!()$#' ']+$
- Allow only numbers between 1 and 10: ^([0-9]|1[0])$
- Character Limit; min of 1 + max of 5: ^(.|\s){1,5}$
There are many resources available online to find and validate Regex patterns:
- Test a Regex pattern here
- Search a library of regular expressions here
- Learn about regular expressions with simple, interactive exercises here
- Find Regex tutorials and a cheatsheet here
![]() |
Use the Customize placeholder text under Advanced Options to show respondents the expected format for the value they will need to enter. |


