# BootstrapValidator A jQuery plugin to validate form fields. Use with [Bootstrap 3](http://getbootstrap.com)  ## Features * Built from scratch. The code is solid and clean * 18 built-in [validators](#validators) and counting! * Cannot find the validator you need? Don't worry, it is easy to [write new validator](#write-new-validator) * Show feedback icons based on field validity * Support Ajax in both validator and form submission * Field validators can be enabled/disabled on the fly * Can be used with other plugins such as [Date Picker](http://eternicode.github.io/bootstrap-datepicker/), [Datetime Picker](http://eonasdan.github.io/bootstrap-datetimepicker/), [Select2](http://ivaynberg.github.io/select2/), [Raty](http://wbotelhos.com/raty) etc. ## Required * [jQuery](http://jquery.com/) * [Bootstrap 3](http://getbootstrap.com/) ## Demo You can see the live demo here: * [Sample demo](https://rawgithub.com/nghuuphuoc/bootstrapvalidator/master/demo/index.html) * [Validator examples](https://rawgithub.com/nghuuphuoc/bootstrapvalidator/master/demo/validators.html) * [Custom submit handler](https://rawgithub.com/nghuuphuoc/bootstrapvalidator/master/demo/submitHandler.html) * [Enable/disable validators on the fly](https://rawgithub.com/nghuuphuoc/bootstrapvalidator/master/demo/enable.html) * [Use with a datetime picker plugin](https://rawgithub.com/nghuuphuoc/bootstrapvalidator/master/demo/date.html) ## Install You can download the [latest version](https://github.com/nghuuphuoc/bootstrapvalidator/releases) or use [bower](http://bower.io) to install BootstrapValidator: ```bash $ bower install bootstrapValidator ``` ## Usage The plugin has two versions: * The source one placed in ```src/js``` directory which is not compressed and doesn't include any validators. It is used in case you want to debug or develop new validator. * The compressed one placed in ```dist/js``` directory which includes all validators. It should be used in the production site. Since the __BootstrapValidator__ plugin requires jQuery and Bootstrap 3, you have to include the required CSS and JS files to your page: ```html // Either use the compressed version (recommended in the production site) // Or use the original one with all validators included // Or use the plugin with required validators ``` Call the plugin to validate the form as following: ```javascript $(document).ready(function() { $(