#Validate
version: 0.1.12
Validate is a requireJS module to validate forms, using jquery has dependency.
bower install validate
First you need to define all required inputs using the class "required".
<form id="frm-validate">
<label for="email">E-mail</label>
<input type="text" name="email" class="inputs required" />
</form>
Now, you need to create a validate instance.
Javascript
define(['jquery', 'validate'], function ($, validate) {
var frm = $('#frm-validate');
var formvalidate = new validate.Validate(frm);
//Check if form is valid
if (formvalidate.isValid()) {
//Code Here...
}
});
Install node dependencies, check package.json and bower.json
npm install && bower install
Use command grunt release
to deploy your changes after your commit.
- Erick Belfort @erickbelfy
Licensed under the MIT License