BootstrapValidator - v0.4.5
http://bootstrapvalidator.com - The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
I've been spending a lot of time to work on this plugin. If it is useful to you, please consider to help the project by making a small donation:
Also, you can make me feel happy by tweeting about it and staring the project on Github.
http://bootstrapvalidator.com/examples/
There are also many examples located in the demo directory.
v0.5.0 is coming soon with the following highlights (all v0.5.0 features, if you care about)
- Add events for form (#121), field (#195), and given validator (#324)
- #125: Support dynamic fields
- #175: Possible to show errors in tooltip or popover
- #385: Support translating error messages in other languages
- #387: Provide the default error messages
Please help me by downloading the latest code and testing the v0.5.0 issues.
Code
- Written from scratch
- Very solid and clean
- The core plugin and validators code are separated
Bootstrap
- Designed to use with Bootstrap 3
- Support almost all Bootstrap forms
- Support Bootstrap form validation states
HTML 5
- Support setting the plugin, validator options via HTML 5 attributes prefixed with
data-bv-
- Support HTML 5 attributes such as
min
,max
,pattern
,required
- Support HTML 5 input types such as
color
,email
,range
andurl
Validator
- 46 built-in validators and counting!
- Easy to write a new validator
Friendly
- Show feedback icons based on field validity
- Support Glyphicons and FontAwesome icons
- Focus on the first invalid field
- Don't validate the field if the field length is less than given number using threshold option
Ajax
- Support validating via Ajax
- Support using Ajax for form submission
Flexible
- The elements can be defined by either
name
or CSS selector - Support multiple elements with the same name
- Possible to indicate excluded fields
- Field validators can be enabled/disabled on the fly
Compatibility
- We play nice with popular plugins such as
Latest version: v0.4.5, released on 2014-05-15.
For older versions, look at the Releases page.
Look at the Change Log
The BootstrapValidator plugin is written by Nguyen Huu Phuoc, aka @nghuuphuoc
Big thanks to the contributors:
- @aca02djr
- @adgrafik
- @alavers
- @easonhan007
- @emilchristensen
- @ericnakagawa
- @evilchili
- @Francismori7
- @gercheq
- @henningda
- @ikanedo
- @iplus
- @jcnmulio
- @jjshoe
- @johanronn77
- @jswale
- @jzhang6
- @khangvm53
- @kristian-puccio
- @lloydde
- @MartinDevillers
- @MrC0mm0n
- @mrpollo
- @narutosanjiv
- @patmoore
- @smeagol74
- @thisisclement
- @tiagofontella
- @tomByrer
- @vaz
- ... might be you! Let's fork and pull a request!
If you submit new RegEx, please build it using RegExr.com, add several tests that pass and fail there, and include the "share" link in your JS as a
//
comment. For example:// Test: http://regexr.com/38mqi
The MIT License (MIT)
Copyright (c) 2013 - 2014 Nguyen Huu Phuoc
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.