Form input validation

Collect accurate information from your users by validating form inputs. Define validation rules using logic conditions, regular expressions or out-of-the-box validation rules.

Fillout supports a number of powerful options for validating form questions. Add validation to your forms to ensure you collect accurate information from your users.

Setting a validation rule

Click on the question you would like to add validation for and open the “Validation” section on the right-hand side settings.
Choose a validation pattern.
notion image

Validate with Regular Expressions

Choose the Regex validation pattern to validate a form input with a regular expression. Regular expressions define a rule for the type of input you want to accept.
See here for a list of popular regular expressions. Examples:
Regular expression
Whole numbers
Alphanumeric without space
Alphanumeric with space
/^[a-zA-Z0-9 ]*$/
Decimal numbers
Whole and decimal numbers
Copy and paste one of the regular expressions above into the “regex” field. Test your form “preview” mode!
notion image

Validate text length

Use the min and maximum length validation rules to specify the accept length of text inputs.
notion image

Validate with logic

Choose the Condition validation pattern to validate a form input based on an arbitrary condition.
For example, here we specify that an input must contain either “gmail” or “yahoo”.
notion image

Email validation

The “Email input” question type validates email addresses out of the box. Use it to collect emails.
notion image

Custom error messages

Provide an Error message to override the default warning message. For example, here we specified “Your pin must be exactly 6 characters” to be the error message.
notion image

Testing validation logic

Go to preview mode and click on the “next” or “submit” button. You’ll see a warning message appear if your inputs don’t match your validation rules.