Skip navigation |

Custom Validation

This section shows you how to add custom validation to your forms, so you can be sure that when they are submitted, the data you receive is as correct as it can be.

Last updated: 09 May 2012, 15:55
Control the length of text entries
Control the length of text entries
You can add validation to your forms to ensure that users must type text of a length that you control. You can add a maximum length, a minimum length, an exact length, or even an upper and lower boundary.
 
National Insurance Number
National Insurance Number
To add a field that collects someone's National Insurance Number to your form, follow these steps to ensure that the user can only enter a valid NI Number.
 
Phone numbers
Phone numbers
To check that someone is only adding valid characters to the Phone Number field on your form, follow these steps.
 
Postcode Validation
Postcode Validation
To add a field that validates someone's postcode, follow these steps to ensure that the user can only enter the postcode in a valid format.
 
Validate anything with Regular Expressions
Validate anything with Regular Expressions
If you know what a Regular Expression is, you can use any regular expression you like to validate text entry in your forms.
 
 
 

Cookies are used by nearly every website to improve your web browsing experience. Recent government legislation (the e-Privacy Directive) means that we are obliged to seek your agreement to the use of cookies when you visit our website. Two of the cookies that we use are essential for this website to operate and have already been set. You may delete and block all cookies from this site, but if you do so, parts of the site will not work. To find out more about the cookies that we use, please see our privacy policy.