Automatic Bootstrap validation based on ngModel
npm install ng-form-groupngFormGroup applies Bootstrap validation classes based on ngModel's validity.
In your Angular project, run npm install --save ng-form-group if you're
using npm, or bower install --save ng-form-group to save the module.
Then, in your HTML, add:
`` html`
And lastly, in your Angular module, include ng-form-group as a dependency:
` javascript`
angular.module('my-app', 'ng-form-group')
Just mark up your form as [recommended by Bootstrap
and any fields with the class form-group will be automatically validated!
` html`
Now, when your model is invalided, by someone entering an invalid email
address, the has-error class will be added to your form-group.
If you want to disable feedback for a specific form, add the form-group-without-feedback
class to the form-group:
` html`
Just add the .has-feedback
class to your form group, and we'll automatically add bootstrap style Feedback
icons to your form fields.
To get your dev environment up and running, run npm install and bower install
to get the components we need.
Tests are run with npm run test and you can build the minified source withnpm run build.
Releases are built using npm run release:[type]. So, to generate a new patchnpm run release:patch
release, run . This script will:
* Generate minified, concatenated JS files,
* Increment the version in package.json and bower.json`
* Tag a new release