An AngularJS directive for advanced forms validation scenarios. Targeted at enterprise level Angular applications.
0 people use it
Author: 5594348? IKoshelev
Submitted by: 5594348? IKoshelev

Directive that works with tags and ng-model and allows you to add validator functions (solo or whole arrays) to JS events of your choice and pseudo events that you will trigger from code.

Typical use example looks like this: ng-dynamic-validator="{default: aValidator, blur: [minLength(3),maxLength(5)], $beforeSend: required(true)}"

• default: aValidator, - function defined on scope, will validate on every keypress • blur: [minLength(3),maxLength(5)] - built-in validators, will validate on blur • $beforeSend: required(true) - we will trigger this validation with a button

Aggregated validity summaries are available per event type and per validator name on each input and for the entire form.

Works with original angular validators and custom validation directives (integrates into normal $parsers pipeline).

The directive provides you with advanced behavior options to facilitate typical validation tasks for enterprise web app forms and uses defaults that will cater to most common needs.

See for examples of use and visit to get the module or whole project

comments powered by Disqus
This page was last updated over 4 years ago.