You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
validator.provider -> validate promise -> error is not called after all the validators execute #53
Hi.
I have let's say 5 validators on a form. On save, i would like to be notified when validation fails, so I can iterate over the failed validators and have some logic.
The problem is that after first validation fails, it calls validatedError function, which calls the validate promise error, ( if (count.error++ === 0) { call promise ) so i get notified that my validation operation failed, but I cant detect when all the validators are completed. A quick and dirty fix would be to change the validatedError and instead of x(); to have $timeout(function () { x(); });, so the root promise error would still be called just one time, but after all the operations on current stack (all validators operatios) complete.
I understand that each control get marked as invalid after all validations happen, and that my $validator.validate(...).success(function () {}).error(function () {}); error get's called, but is there any way to know when all validations are completed ? maybe I am missing some info at this point
Activity