The ePly registration system allows you to create custom validations that can be used to force registrants to enter data in a specific format such as a date (MM/DD/YYYY).
To create a custom validation:
Click into text box or text area field
Click 'add validation'
Set the type to 'custom'
Click save, you will now see a box for valid expression.
Enter a regular expression for the validation you need. This requires an understanding of regular expressions. If you aren't familiar with writing regular expressions, use one of the samples below, or try searching in Google for the type of expression you need.
Enter an appropriate error message
Save your work and test the expression
Regular Expressions
When you copy and paste the expressions below, be sure to use the exact expression without any extra spaces or it will not work.
Type Matches Allowed Expression
Date MM-DD-YYYY 12 31 2001
12-31-2001
12.31.2001
12/31/2001
^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$
Date DD-MM-YYYY 31 12 2001
31-12-2001
31.12.2001
31/12/2001
^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$
Date DD-MMM-YYYY 12-jan-2001
12-Jan-2001
12-JAN-2001 etc. (?i)^(0[1-9]|[12][0-9]|3[01])[- /.](Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[- /.](19|20)\d\d$
To create a validation for a dollar amount such as $1,234.33, use: ^\$?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$
- This expression allows the user to omit the $ sign, comma separator, and trailing cents.
To create a validation for a specific number of digits allowed in a field, use .*\b\d{12}\b.* (Note - the number in the { } indicates the number of digits allowed, therefore the example used allows for 12 digits)
To create a validation for a specific number range (useful for validating things like membership numbers), use the following online tool
Comments
0 comments
Article is closed for comments.