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.
When creating a form that has the setting allowInvalid: true I noticed that I was getting false positives for ng-minlength validation. I have a directive that adds a parser that filters out invalid characters that the user may try to input. In the example below '!' is an invalid character. If the user types in 'a!' the view is updated to just 'a' but minlength=2 returns true.
This happening because this.$$parseAndValidate sets the viewValue variable before the parsers run and never updates it. This cause the original viewValue to be passed to the validators. So the minlength validator sees 'a!' instead of the current value of 'a'.
I was able to correct this behavior by updating the first line of the parsers loop to