Validate Helper
Validate_helper.js is a jquery plugin that helps you use validate.js to validate forms, without the need for creating the validation object. Rather you simply add few attributes to the form elements as stated below.
In addition to that validate_helper uses bootstrap to display the error messages.
Download as zip
Libraries required
- jquery-1.7.1.min.js
- bootstrap.min.css
- validate.js
- validate_helper.js
Sample Login In Form
Form attributes to be added
- Add name,id for the form tag
- Add class "validate" for the form elements you want to validate
- Add "data-rules" attribute to specify the rules in validate.js
- Add "data-display" attribute to specify the display attribute in validate.js (optional)
- Add control-group, help-block to display the errors
Sample code
Add the function call as shown below
Having an optional callback after validation