Validations allow you to check the data that has been submitted for your user defined fields to make sure it meets a certain requirement. This document provides an overview of the different types of validations that are available and any special settings required for them.
Validation Types
A number of different validation types are available when you add or edit a user defined database field. Each of those types are described below.
None | No validation will be done on this field |
Alphanumeric | This field must contain only English letters and numbers |
Between | This field must be a numerical field that falls in a range between two values |
E-mail Address | This field must be a properly formatted e-mail address |
Greater Than | This field must be a numerical value that is greater than the specified value |
Less Than | This field must be a numerical value that is less than the specified value |
Length | This field must be a string that has a length in a range of two values |
Numeric | This field must be a valid integer or decimal number |
Regular Expression | This field must conform to the specified regular expression |
HTTP URL | This field must contain a properly formatted HTTP URL |
Working URL (Redirection OK) | This field must contain a properly formatted HTTP URL that is working (the URL is allowed to redirect to another URL) |
Working URL (No Redirection) | This field must contain a properly formatted HTTP URL that is working (the URL is not allowed to redirect to another URL) |
Some of the validation types require special settings so that the data can be checked against a value(s) that you specify. When you add or edit a user defined field, you will notice that there is a text input box following the validation type selection field. This is where you will enter the settings for the validation type, if it is required. Each of the validation types that require a special setting are described below.
Between | Enter two numbers separated by a comma, with the smaller number first. For example, to allow values in the range of 5 to 100 enter 5,100 in the text input box |
Greater Than | Enter the number that this field must be greater than |
Less Than | Enter the number that this field must be less than |
Length | Enter two numbers separated by a comma, with the smaller number first. For example, to allow strings with lengths of 10 to 200 characters, enter 10,200 in the text input box. |
Regular Expression | Enter the regular expression to test against in the text input box. This must conform to PHP's built in Perl Compatible Regular Expression syntax |
Working URL (Redirection OK) | Enter the error message to display if the URL is not working. For this validation type, set the Validation Error field to a message that indicates the URL is not properly formatted. |
Working URL (No Redirection) | Enter the error message to display if the URL is not working. For this validation type, set the Validation Error field to a message that indicates the URL is not properly formatted. |