e-addons

Share

ic Pro Form Extended bwe-ProForm Extend

Pattern and Mask Extension

With e-addons Pattern and Mask Extension, you can validate the data entered in the fields of your form by comparing them with the previously set text masks.

It will be easy for you to record emails only one or a few providers (eg. Google.com) or accept alphanumeric codes that meet specific criteria such as tax codes.

Validate the fields inserted in the form by comparing them with pre-established criteria
Field PatternMask

Pattern and Mask Extension

Pattern
On Text, Date, Email and Password Field Type in the Form > Content > Form Fields > Your Field > e-addons Tab you will find the option where you can insert a Regular Expression (aka REGEX) which value is checked against on form submission.
Leave empty for no effect.

Use Mask
The pattern will be used as Mask, so an inputmask helps the user with the input by ensuring a predefined format. This can be useful for dates, numerics, phone numbers.

Is Regex
If you want to use the Mask on a REGEX you have to enable this additional option.

DEMO

Pattern Mask Text-Field

Default HTML5 email regex:
^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$
yahoo|hotmail|gmail regex:
(\W|^)[\w.\-]{0,25}@(yahoo|hotmail|gmail)\.com(\W|$)
Gmail Mask:
*{*}@gm\ail.com
Italian Codice Fiscale regex:
^[a-zA-Z]{6}[0-9]{2}[abcdehlmprstABCDEHLMPRST]{1}[0-9]{2}([a-zA-Z]{1}[0-9]{3})[a-zA-Z]{1}$
Phone Mask:
(+99[9]) 9999-9999
IP Mask:
9[99].9[99].9[99].9[99]
Date Mask:
99/99/9999
Time Mask:
99:99:99
Credit Card Mask:
9999-9999-9999-9999
Expiration date Mask:
99/99
CVC Mask:
999