Hi, a copy of my StackOverflow question: https://stackoverflow.com/questions/28190414/have-one-asyncvalidators-to-run-if-any-of-three-fields-is-changed
I am about to use $asyncValidators in my form. Typical examples, such as http://jaysoo.ca/2014/10/14/async-form-errors-and-messages-in-angularjs/, explain how to attach validator (and validate/invalidate) a single field. I have three fields in my form and each field may or may not be valid depending on a combination of input in these fields. So I want to send all three fields to server and get a reply that says which field is valid and which is not, e.g. {field1Valid:false, field2Valid:true, field3Valid:false}. That would then be indicated in the form. So I want the single validator to be attached to *form* and working when any of my three form fields are changed. Upon receiving a reply as sketched above, fields must be (in)validated and some messages must be shown. If other change happens to these fields during the pending validation request, the request needs to be dropped and new one to initiated. How I can configure this behaviour using $asyncValidators? Thanks in advance for your kind help! -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
