Recent news

Friday, 20 May 2016

Bootstrap 3 jQuery Validator Plugin




Bootstrap-validator is a very simple and effective form validation plugin for bootstrap 3.  This plugin is very effective and user friendly. This plugin user HTML5.


How To Use

1. Add the below library reference

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://1000hz.github.io/bootstrap-validator/dist/validator.min.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="http://1000hz.github.io/bootstrap-validator/assets/js/application.js"></script>


2. Now add the below html tag.

<form role="form" data-toggle="validator">
  ...your controls
</form>


3. Add the below code to perform operation

$('#form').validator().on('submit', function (e) {
        if (e.isDefaultPrevented()) {
            // handle the invalid form...
        } else {
            // everything looks good!
        }
    })



Pranav Singh Author: Pranav Singh

Hello, I am Author of this blog. The main purpose of this blog is to provide all the jQuery plugins which is helpful in designing and developing a web application in a single location from the web.

Previous
Next Post »

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles