jQuery Plugin for Easy HTML5 Form Validation - Validatr

jQuery Plugin for Easy HTML5 Form Validation - Validatr
File Size: 124 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Validatr is a simple, easy-to-use and Cross Browser jQuery plugin for native form validation by using modern HTML5 input attributes.

Basic Usage:

1. Include jQuery library and Validatr.js

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/validatr.js"></script>

2. Include Validatr CSS to style your plugin

<link rel="stylesheet" href="css/validatr.css">

3. Markup

<form action="">
    <label for="email">Email</label> 
    <input type="email" id="email" name="email" required>
    <div>
        <input type="reset" class="btn" value="Reset">
        <input type="submit" value="Submit">
    </div>
</form>

4. Call the plugin

jQuery(function ($) {
   $('form').validatr(); 
});

Change Log:

v0.5.1 (2013-03-12)

  • Added unit tests for the jQuery instance and the widget
  • Fixed typo 'defualtOptions' - now 'defaultOptions'
  • Re-structured code to prep for more robust formatting and adding more input types

v0.5.0 (2013-03-11)

  • Added unit tests for the jQuery instance and the widget
  • Fixed typo 'defualtOptions' - now 'defaultOptions'
  • Re-structured code to prep for more robust formatting and adding more input types

v0.4.2 (2013-03-04)

  • Default error message styles now inline - removed CSS file
  • No longer overwriting this.options.template, now this.template
  • Changes to documentation

This awesome jQuery plugin is developed by jaymorrow. For more Advanced Usages, please check the demo page or visit the official website.