Ionso Sheinberg
posted this on July 23, 2010 15:23
Recently, a couple of clients have reached out to us regarding validation within their LiveBall forms. More specifically, how to:
Using “regular expressions” you can define how a field should be validated. LiveBall is pre-configured with validation for some basic fields — email, date, etc. However, you also can add your own validation: Integration > Data Collection > + Validation Pattern
HOW TO: Allow for "+" or area code beginning with "0"
^(\+[1-9][0-9]*(\([0-9]*\)|-[0-9]*-))?[0]?[1-9][0-9\- ]*$
Matches: +123(45)678-910 | +123-045-67 89 10 | 01-234-56-78
Non-Matches: 123(45)678 91011 | (12)345-678 | +0(12)345-6789
Details & source
HOW TO: Require "+"
^[+][0-9]\d{2}-\d{3}-\d{4}$
Matches: +974-584-5656 | +000-000-0000 | +323-343-3453
Non-Matches: 974-584-5656 | +974 000 0000
Details & source
For more validation patterns, visit: RegExLib.com