Inspired by Bootstrap + jQuery form validation
There are some libraries and various blog post with examples out there which dictates how we can do the basic form validation in AngularJS application. But those examples are full of code duplicacy and some uses jQuery but there are no generic solutions.
This library solves the pain of various Bootstrap + AngularJS developers by providing jQuery like validation(of course without the jQuery) and using the Bootstrap's form validation classes.
- This module uses ES5 style guide.
-
Minimum AngularJS version required: 1.3.0. If you are using an older version of AngularJS, please use the version
0.0.1
of this library but that have some known bugs which are fixed in newer versions. -
IE 8 & below are not supported.
See Releases for changes.
bower install bootstrap-angular-validation --save
<script src="bower_components/bootstrap-angular-validation/dist/bootstrap-angular-validation-all.min.js"></script>
Make sure CSS for Bootstrap is also included in your application. Read the docs
var myApp = angular.module("foo", ["bootstrap.angular.validation", "other-foo-depenency"]);
Basic Bootstrap validation has enabled in your forms. No further setup and no alternation required. Try submitting a form with some validation and see the magic.