angular/angular.js — Issue #631: forms should allow "form-level" validation
Author: vojtajina
Created: 2011-10-29 17:04:04+00:00
State: open

Use case:

- confirm (re-type) password
- datepicker from / to (to must be greater)
- more

Problems with current design:
- difficult to access the form from controller (you can only access the root form and listen on its "$validate" event, which works, but...), so probably want to add "ng:validator" attribute for forms ?
- then, when doing the validation, we need to access the widgets, because you can fire $valid/$invalid only on widget (not possible on form level) and accessing widgets is tricky...

Check out this ugly sollution of confirm password with current design:
http://jsfiddle.net/vojtajina/AVGMQ/