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 }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
The new $asyncValidators are a nice addition. But there seems to be a critical missing piece here: there doesn't seem to be a way to react when the $asyncValidators complete their work.
The documentation and blog entries I've been able to find will occasionally mention that you can add a check for $pending to a submit button to prevent submission. But that seems to be a really constrained option, since it offers no programmatic control.
The only option I could come up with was to check if $pending is present on the form scope, and add a watch on it. When $pending is removed, I can clear the watch and trigger additional logic. This works, but it seems harder than it should be.
My thought is to add a "promise" key to the $pending object, that provides a Promise around the async validation logic. This way, we would be able to do $pending.promise.then( ... ) to react when the async validation is complete.