Validation Rules 


In this Article
Related Articles

The purpose of input validation is to help your respondents provide the desired answers in the expected format. It is an aid, and it is not designed to be foolproof. There are ways one can bypass the validation and, although rare in a normal use case, invalid responses should not be unexpected.


Note: It is not suggested to use more than one validation type per field.

All validation rules can be accessed by clicking on a field, selecting Options and then selecting Validation Rules from the left-side option menu.


Limit Length of Input

This option allows you to set the maximum characters or words to be allowed in a text field. You can only define a limit for characters or words and not for both.


Required Fields

Users can be required to fill out a given field before submitting or proceeding to a form's next page.

To set a field as required:

  1. Select your question and click the Options button to open the editing sidebar
  2. Select Validation Rules from the sidebar.
  3. Check the corresponding box for This is a required field.
  4. This can also be accomplished by clicking the Req'd icon after clicking on a field in your form.


Require an Email Address

To require a valid email address:

  1. Select a text input question and click the Options button to open the editing sidebar.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Email.
Note:  An underscore in a domain of an email is most-likely a human error but FormAssembly's email validation will allow it to pass. However, Salesforce's validation will not accept the format of an underscore in the domain of an email.

Require Numbers Only

To require numbers only:

  1. Select a text input question and click the Options button to open the editing sidebar. Or, you can select your question with the sidebar open.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Number [0-9].

Require a Number Within a Range

Numbers can be limited within a range by doing the following:

  1. Select a text input question and click the Options button to open the editing sidebar.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Number [0-9].
  4. Enter the lower number in the From field and the higher number in the To field.

Require a Date and/or Time

To require a field to accept only a date:

  1. Select a text input field and click the Options button to open the editing sidebar.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Date, Time, or Date and Time.

Select the Date (with calendar) option if you'd like to allow respondents to use a calendar to select the date.


Require a Date and/or Time Within a Range

Date inputs can be limited to a specific range. To enter your range:

  1. Select a text input field and click the Options button to open the editing sidebar.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Date, Time, or Date and Time.
  4. Enter your beginning date in the From field and your ending date in the To field.

Require a Custom Format

Create your own formatting rules by using regular expressions, creating an automatic format, or by limiting the number of characters that can be entered into a field.

  1. Select your question and click the Options button to open the editing sidebar.
  2. Select Validation Rules from the sidebar.
  3. In the Expected Input Format menu, select Custom...
  4. Create your rules in the corresponding fields.


Auto-Format with a Mask

The auto-formatting can be used for a more simple pattern, such as a phone number or serial number.

For instance, let's say you have a serial number field and all of the serial numbers expected to be entered on your form start with M4K, then have 4 numbers and 2 letters. The mask would be M4K####$$, with # = numbers and $ = alphanumeric characters (letters or numbers).

Characters like commas, slashes, and dashes will all act like M4K and only function as place holders. The expected format will be visible once the field is selected.

Note: The Auto-Format with a Mask feature does not work reliably on Android phones. The best alternative would be to use a regular expression instead. Please contact support with any questions.

Validate with a Regular Expression

Regular expressions can help you define an expected pattern.  Crafting regular expressions can be difficult. It is usually best to copy & paste an existing expression than trying to come up with your own. 

While we'd like to provide as much support as we can, we are unable to support expressions as they can break in ways we cannot predict such as when updates are made. 

Please reference the links below for information and assistance on expressions:


Terms of Service · Privacy Policy