Validation RegEx

Adding a validation regular expression to text questions ensures your users input their form responses in a specific way.

Copy and paste the Validation RegEx strings into the Text question type in your custom forms template builder.

Question Name Example Validation RegEx
Social Security Number 123-45-6789 /^\d{3}-\d{2}-\d{4}$/ig
Phone Number Variation 1 (555) 555-5555 /[(]\d{3}[)] \d{3}-\d{4}/ig
Phone Number Variation 2 555-555-5555 /^\d{3}-\d{3}-\d{4}$/ig
Bank Account 00000123456789012 /\b\d{17}\b/ig
Routing Number 123456789 /\b\d{9}\b/ig
Email Address Sample@sample.com /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
Zip Code 91234 /\b\d{5}\b/ig