Use the regular expressions to easily check if a value meets a 'rule'. E.g.: Check if a number is a correct postal code. See how to construct this expressions in the Text Functions section. There are several regular expressions already created that you can use together with the 'Regular Expression' function:
Number
This
regular expression represents any number, with its sign and its
decimal part separated from the integer part by either '.' or ','.
/^[-]?[0-9]+[.|,]?[0-9]+$/
This
regular expression represents any valid email address according to
the standard. Check for the name, the @ symbol and the domain names.
/^[0-9a-zA-Z]+@[0-9a-zA-Z]+[.]{1}[0-9a-zA-Z]+[.]?[0-9a-zA-Z]+$/
Percentage
This
regular expression accepts any number with an integer part up to two
digits and a decimal part up to two digits.
/^\d{0,2}(.\d{1,2})?$/
Money
This
regular expression accepts any monetary value in the form
$34,245,456.33, where the dollar symbol and the decimal part are
optional.
/^\$?[1-9][0-9]{0,2}(,[0-9]{3})*(.[0-9]{2})?$/
Postal code
Accepts
any UK postal code, which are one or two town district letters, followed
by one or two digits, followed by a white space, followed by a digit,
followed by two postal district letters. Also any Spanish postal
code is accepted, which are numbers of five digits.
/(^[A-Z]{1,2}[0-9]{1,2}) ([0-9][A-Z]{2}$)|(^[0-9]{5}$)/
Credit card
This
accepts all Visa credit cards.
/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/
Phone
Accepts
any number between six and ten digits, optionally separated in its
second or third digit by a dash or a white space.
/^[0-9]{2,3}-? ?[0-9]{6,7}$/
URL
This
accepts all possible URLs, which are strings matching the following
notation:
resource_type://username:password@domain:port/filepathname?query_string#anchor.
/^[A-Za-z]{2,}://(/)?([A-Za-z0-9]+:[A-Za-z0-9]+@)?[A-Za-z0-9.-]{3,}(:[0-9]{2,10})?(/[A-Za-z0-9]+)*((?[A-Za-z0-9]+=[A-Za-z0-9]+)(&[A-Za-z0-9]+=[A-Za-z0-9]+)*|/)?(#[A-Za-z0-9]+)?$/