Full-featured jQuery Form Validation Plugin - Prove.js
File Size: | 224 KB |
---|---|
Views Total: | 3384 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

Prove.js is a robust jQuery plugin that provides modular, full-featured, event-based, user-friendly, synchronous or asynchronous validators and decorators for your existing form fields. Check out the advanced example for more details.
Basic usage:
1. Make sure the jQuery library is loaded properly inside the html page.
<script src="//code.jquery.com/jquery.min.js"></script>
2. Include the core JavaScript and it's decorator addon after jQuery.
<script src="dist/prove.js"></script> <script src="dist/decorator.js"></script>
3. Active the plugin on your html form as follow.
var form = $('form'); form.prove({ // configurations here });
4. Decorate the form using Bootstrap and the decorator addon.
form.decorate('bootstrap');
5. All possible configuration options for the prove
method.
form.prove({ debug: false, fields: { field1: { debug: false, enabled: true, selector: '[name="field1"]', trigger: 'click change', stateful: true, group: false, validators: { // see validator options } }, field2: { // ... }, }, submit: { selector: 'button:submit', validate: true, enabled: true, } });
Change logs:
2018-03-23
- cleanup
2018-02-24
- Fixed default value in $.fn.change
2018-02-23
- $.fn.clear works on hidden inputs
2018-01-23
- Fixed regex patterns in sanitize
2017-11-04
- Added has any text selector
2017-10-05
- Included a new validator to prove if form has a valid JSON text structure
2017-04-02
- add input sanitize as a core feature
2017-02-11
- accessibility support
2016-12-28
- code quality - improve plugin naming
2016-12-09
- bug fix
2016-11-25
- Work on phasing out $.fn.hasValue() in favor of $.hasValue(values). In most cases we already had the values and $.fn.hasValue() would walk up the DOM again. Therefore, besides better code quality we also get better performance.
2016-11-24
- garland plugin should insert the error as the last DOM element, but before any static form controls
2016-11-01
- fixed grouped values
2016-10-31
- clear plugin now will show/hide form dom elements on invocation
This awesome jQuery plugin is developed by provejs. For more Advanced Usages, please check the demo page or visit the official website.