Requirements


AngularJS 1.2.x (for angular-validation 1.2.x)

AngularJS 1.3.x (for angular-validation 1.3.x)

Installation


Install with npm

npm install angular-validation 

Or with Bower

bower install angular-validation 

Files to download


Add the files to your html

<script src="dist/angular-validation.js"></script>
<script src="dist/angular-validation-rule.js"></script>

If you are using Bower:

<script src="lib/angular-validation/dist/angular-validation.js"></script>
<script src="lib/angular-validation/dist/angular-validation-rule.js"></script>
angular.module('yourApp', ['validation']);

Including your validation rule

angular.module('yourApp', ['validation', 'validation.rule']);

Writing your first code

<form name="Form">
        <div class="row">
            <div>
                <label>Required</label>
                <input type="text" name="required" ng-model="form.required" validator="required"></div>
                <div>
                    <label>Url</label>
                    <input type="text" name="url" ng-model="form.url" validator="required, url">
                </div>
                <button validation-submit="Form" ng-click="next()">Submit</button>
                <button validation-reset="Form">Reset</button>
        </div>
</form>

You can style different states of your form elements using the following selectors

Invalid Selectors
.ng-invalid.ng-dirty { /* Your style here */ }
Valid Selectors
.ng-valid.ng-dirty { /* Your style here */ }

You can also include your vendor libraries classes in you are using CSS preprocessors such as LESS or SASS.

Using Bootstrap classes
.ng-valid.ng-dirty { .has-error .form-control; }

For more on AngularJS validation classes check at their documentation.