After trying a load of non intuitive and not very useful jQuery form validation plugins I came up with this plugin. Its a jQuery plugin which helps create easy form validations with high flexibility and a large set of options.
- Supports custom validations
- Options to toggle between live and onsubmit validations
- Completely customizable CSS
- In the head section add the following code:
- Add the form in the body as shown below
That’s it you are done!
For advanced users:
or . The value of the field is given by . As this is a string escape characters for backslash and other non standard characters must be used. (Default: return true;)
- message: The validation message for the field. (Default: “”)
- error_class: The CSS class of the error message container. (Default: “ValidationErrors”)
- error_field_class: The CSS class added to the field when found invalid. (Default: “ErrorField”)
- live: Sets whether the validation of the field should be live or on form submit. (Default: true)