A jquery plugin for validate.js form validation library, coupled with twitter bootstrap
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits behind magizh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



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. visit validatehelper.cloudfoundry.com to check out the form validation example and documentation.

In addition to that validate_helper uses bootstrap to display the error messages.

Special thanks to Rick Harrison for Validate.js. Its awesome!

Libraries required

  • jquery-1.7.1.min.js
  • bootstrap.min.css
  • validate.js
  • validate_helper.js

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
<form name="loginForm" id= "loginForm" action="#" method="POST">
  <div class="control-group">
    <input type="text" name="email" id="email" data-rules="required|valid_email" data-rules="Email" class="validate">
    <p class="help-block"></p>
  <div class="control-group">
    <input type="password" name="password" id="password" data-rules="required" class="validate">
    <p class="help-block"></p>
  <button type="submit" class="btn">Sign in</button>
  • Add the function call as shown below
var $my_form =  $("#loginForm")
  • Having an optional callback after validation
var $my_form =  $("#loginForm")
$my_form.validate(function($form, e){ alert("submitted") })

Contact Email: mahilis@live.com