It appears that the default behavior of validations on an input element with multiple validation directives (eg required, min-length, and pattern) is to check validations until one fails and then stop. Is this expected? I see this because with the above example if I inspect the form.field.$error object only one value ever seems to be true. For example if I had the following input defined:
<input type="text" ng-model="user.username" name="username" required ng-pattern="/^[^\s,]+$/" ng-minlength="6"> Initially form.username.$error.required = true and the other properties equal false. When a single character is entered then form.username.$error.required = false, and .minlength = true. I would like to be able to show (using ng-show) prompts for all validations that are currently not satisfied, rather than just the first. What is the best way to achieve this in the "Angular way". Thanks Chris -- 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/groups/opt_out.
