jpkleemans / angular-validate

Painless form validation for AngularJS. Powered by the jQuery Validation Plugin.
MIT License
68 stars 33 forks source link

Rules per element as directives #15

Closed stamminator closed 7 years ago

stamminator commented 7 years ago

Not an issue, but a feature request. It would be incredibly handy if, per input element, you can add a directive in which you specify the validation rules, but only for that element. Something like this:

<input type="email" ng-rules="{ email: true, myCustomMethod: true }" />

Seeing that the addClassRules method doesn't work in this angular port, this might be a workable substitute for it.