Data Entry Validation [Developer]

Developer Feature

The following feature utilizes RegEx, a form of coding, and we recommend that you consult your developers/tech team and test your data entry validation.

In the Data Collection Stage, short answers can be restricted to follow a specific format using Data Entry Validation. You can customize the parameters to what the applicant can enter. For example, Data Entry Validation can ensure that the answer to the short answer question "California Driver's License number" must start with a letter followed by 7 digits.

To express this validation format, you'll be using Regular Expression (RegEx), a coding language that uses a sequence of characters that defines a pattern. We recommend you consult your developers to help ensure your RegEx is functioning as intended. 

What's Covered


Adding Validation to Short Answer

You can only use the Data Entry Validation feature for custom questions with a short answer.

  1. Add a Data Collection stage.
  2. Click Customize fields for data collection stage.
  3. Click Add Question. Type in your custom question and data key.
  4. Choose Short answer as your answer type. Click the checkbox on the bottom right of the question.
  5. On the left text box, enter in the format the answer needs to be in using RegEx.

    Note: Acceptable RegEx

    You do not need to input "/” to start and end your expression. When entering your Regular Expression into Fountain, only include the pattern. See below for common RegEx validations.

  6. On the right text box, enter the error message applicants will get if they enter an incorrect format.

    Best Practice

    We recommend that your error message explicitly tells the applicant what the input should be. i.e. "Zip Code should be 5 digits."

  7. Click Save, and you're set!


Common RegEx Validations

Copy-paste the RegEx into the Enter Regular Expression text box if you want to use it. Keep in mind that these will not have the "/” that starts and ends the expression, as these are unnecessary. These are some of the common expressions -- for more complex expressions, please consult your developers/tech team.

Data Type RegEx checks for: Regular Expression
Social Security Number  9 digits
Zip Code (US)  5 digits
Bank Number (US) 4 to 17 digits 
Passport  6 to 9 upper-case letters or digits
License Plate Number (CA)  1 digit, then 3 upper-case letters, then 3 digits
Driver's License Number (CA) 1 upper-case letter and 7 digits


Must have an @ > a period > with characters throughout


^(0[1-9]|1[012])[\- \.](0[1-9]|[12][0-9]|3[01])[\- \.](19|20)\d\d$


^(0[1-9]|[12][0-9]|3[01])[\- \.](0[1-9]|1[012])[\- \.](19|20)\d\d$

External Resources

Here are some additional external resources to use as reference and testing when building your RegEx.

Regexr Regexpal Rubular
Was this article helpful?
34 out of 40 found this helpful



Please sign in to leave a comment.