Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$asyncValidators rejection message #13201

Open
klmdb opened this issue Oct 29, 2015 · 1 comment
Open

$asyncValidators rejection message #13201

klmdb opened this issue Oct 29, 2015 · 1 comment

Comments

@klmdb
Copy link

klmdb commented Oct 29, 2015

Is there any way to display the $asyncValidators rejection message in the template?

I guess I could setup an isolated scope in my validation directive and then set the message to a bound variable, but that seems like a kind of hack outside the expected validator flow.

The same case could be made for a validator that receives unexpected input. It seems like a validator should have 3 possible states instead of {true, false}: {true, false, undefined} with the undefined state exposing the error message somehow.

@Narretz
Copy link
Contributor

Narretz commented Nov 13, 2015

Yes, it would make more sense if Validators could return metadata in errors / successes. Defintiely something to consider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants