- jQuery Form npm i --save-dev jquery-form@4.2.0
- jQuery Validation npm i --save-dev jquery-validation@1.16.0
- jQuery Rut npm i --save-dev jquery.rut@1.1.2
- Sweetalert npm i --save-dev sweetalert@1.1.3
npm install jquery-formulator --save-dev
npm install jquery-formulator jquery-validation@1.16.0 jquery-form@4.2.0 jquery.rut@1.1.2 sweetalert@1.1.3 --save-dev
require('jquery-formulator');
$(document).ready(function(){
$('form').formulator();
});
You must add the class .form-validate
<form action="" class="form-validate">
...
<input type="text" name="firstname">
</form>
Add this to show form errors
<div class="form-errors"></div>
You must add the class .form-ajax
<form action="" class="form-ajax">
...
<input type="text" name="firstname">
</form>
Example with both classes
<form action="" class="form-ajax form-validate">
...
<input type="text" name="firstname">
</form>