Custom Fields can have specific validation applied. This is to ensure Paid Registration users enter a desired value into the fields during the activation of their registration.
As examples;
- Limit a Custom Fields called "Member Number" to 11 numeric characters only.
- Ask the person for a link to their Linked In profile and validate it to ensure its a valid URL.
- Ensure a valid email address is entered into the "Alternate Email" field.
Adding Validation
Validation is added to the following field under Event Configuration > Settings > Custom Fields.
A blank field means there are no validation rules being applied.
Validation Rules
Validation rules can be applied singular or combined into the Validation Rules field. If combined, they must be separated by pipe. e.g:
between:1,11|numeric
To use validation rules, simply paste the validation rule (e.g: "alpha" or "alpha_dash" into the Validation Rules field in the Custom Field.
Here are the available validation rules:
- alpha
- alpha_num
- alpha_dash
- between
- digits
- max
- max_value
- min
- min_value
- numeric
- url
alpha
Validation Rule: alpha
Must only contain alphabetic characters.
alpha_num
Validation Rule: alpha_num
Must contain alphabetic characters or numbers. No spaces or special characters.
alpha_dash
Validation Rule: alpha_dash
Must only contain alphabetic characters, numbers, dashes or underscores.
between
Validation Rule: between:1,11
Must have a numeric value bounded by a minimum value and a maximum value, in this example, between 1 and 11.
digits
Validation Rule: digits
Must be numeric and have the specified number of digits.
Validation Rule: email
Must be a valid email address
max
Validation Rule: max:11
Must not exceed the specified length, in this example it's 11 characters.
max_value
Validation Rule: max_value:500
Must be a numeric value and must not be more than the specified value, in this example it's 500.
min
Validation Rule: min:3
Must not be less than the specified length, in this example it's 3 characters.
min_value
Validation Rule: min:100
Must be a numeric value and must not be less than the specified value, in this example it's 100.
numeric
Validation Rule: numeric
Must only consist of numbers.
url
Validation Rule: url
Must be a valid URL