Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

FormsForm Builder
Input Mask Format

Input Mask Format

Use the Format field option to make sure users provide information in the right format. This can range from phone numbers to postal codes to serial numbers, and much more! Below, you will find information on how to customize the format of a Single Line Text field and Phone Number field.

Please note: If the format option is left empty in a Single Line Text field, no extra validation will be applied. If the format field is left empty in a Phone Number field, the field will be validated to make sure a valid phone number has been entered.

Set a format with an input mask

— Premium Feature —

You may use the format option to require a specific format and simultaneously apply an input mask. An input mask helps your users enter the correct format, as shown below: Format Input Mask

How to set a specific format

Determine the format that will be accepted by following the directions below.

  1. Go into the Single Line Text or Phone Number field options.
  2. Look for the Format dropdown, and select Custom option.
  3. Type your preferred format in the Custom Format box right next to it. Click the (...) menu icon for more information on what specific set of symbols are acceptable to create a custom input mask. Add Input Mask Format in a phone field
  4. Save your form and preview it. When you position your cursor in the field, the input mask will appear. Users can only enter characters that fit the saved format. Phone Number Alpha/Numeric Format

Accepted characters

The following characters can be used in the Format settings:

  • 9 - requires any numeric character
  • a - requires any alphabetic character
  • * - this is a wildcard; allows any character
  • ? - makes the following characters optional

Examples

  • Require a phone number in the (999)999-9999 format.
    (999)999-9999
  • Require a properly formatted social.
    999-99-9999
  • Require 5-6 numbers.
    99999?9
  • Require 4 alphabetic characters followed by any character.
    aaaa*

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Regular expression validation

If the standard format options don't offer the flexibility that you need, use a regular expression to completely customize the format validation. Insert a regular expression beginning with ^ in the Format box. Please note that this will not add an input mask to your field. It will simply make sure the entered values match the format in your regular expression. If the entered values don't match the format, an error will appear after the Submit button is clicked.

Syntax

^[Expression body here]$

Please note that both the starting ^ and ending $ are required to treat the format as a regular expression. If you have questions about your regular expression, you can refer to many free regular expression devoted websites.

Regex examples

  • Require 5-10 alphanumeric characters.
    ^([a-zA-Z0-9]{5,10})$
  • Require 99.9999.9999 or 99.99999.9999 for the phone number format.
    ^([0-9]{2}.[0-9]{4,5}.[0-9]{4})$
  • Disallow certain characters. The following example will remove a, 1, ", and '.
    ^([^a1"']+)$
  • Only allow alphabetic characters.
    ^([a-zA-Z]+)$
  • Allow 1-3 characters country code and 2-3 characters area code to create an international phone number format, e.g. Switzerland (+41-83-333-3333)
    ^(+[0-9]{1,3}-[0-9]{2,3}-[0-9]{3}-[0-9]{4})$
  • Disallow a certain word. The following example will exclude the word mini.
    ^((?!mini).)*$
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms