match only starts when dirty
Closed this issue · 1 comments
Example input fields:
<input ng-model="user.password" type="password">
<input ng-model="user.checkpassword" type="password" match="user.password">
When I put something in user.password, user.checkpassword will still have ng-valid-match instead of ng-invalid-match.
I think the match only becomes invalid when user.checkpassword is dirty, but it should become invalid when user.password is dirty (and they do not match of course).
This was a feature to not display an error until after the user has had a chance to enter the confirmation. Using required
would force the user to enter a value and dirty the field.
I suppose if I force the developer to check if the field is dirty before displaying an error, I can make it invalid right away.