Create and Validate a Zip Code Question

Looking to collect US zip codes and validate that the entries are correct? Here's how!

  1. Click Question at the bottom of the page where you wish to add your zip code question. 
  2. Select Textbox from the Question Type dropdown menu and enter your question text.
  3. Next, head over to the Validation tab and select RegEx in the Answer Format dropdown menu. 
  4. In the Common Patterns dropdown menu that appears after selecting Regex, select US Zip Code 5 or 9 digit (w/ dash). This will populate with the RegEx Validation field with pattern that will validate that your respondents enter either a 5-digit US Zip Code or a 9-digit US Zip Code with a dash.
    Select RegEx Validation Pattern
  5. Finally, enter the message you wish to display if the survey respondent's entry does not pass your RegEx validation rules.Customize RegEx Error Message

FAQ

What if I wish to allow 5-digit zip codes only?

You can do this! To do so follow steps 1-3 above. Then, instead of selecting from the Common Patterns dropdown menu simply paste the below code in to the RegEx Validation field. Finish by entering the message you wish to display if the survey respondent's entry does not pass your RegEx validation rules.

^\d{5}$

Basic Standard Market Research HR Professional Full Access Reporting
Free Individual Team & Enterprise
Feature Included In