formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.23k stars 406 forks source link

Dynamic async validation message #730

Closed harm-less closed 7 years ago

harm-less commented 7 years ago

Hello,

I can't seem to figure out if it's even possible or not. This demo is pretty much what I want to achieve, but I'd like the server message to be shown in the message (dynamic message).

Even if I turn the message's value to a method, the server's response (in this case the message from the thrown error) can't be retrieved. Am I missing something or is this a feature missing?

gmanriqueUy commented 7 years ago

I think you're looking for something like this http://jsbin.com/zafoyi/2/edit

harm-less commented 7 years ago

That seems to do exactly what I need. Thank you so much for explaining this to me!

gmanriqueUy commented 7 years ago

Glad to help! :wink: