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.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Formatters for built-in validators should not return undefined for invalid values. #3594
The $formatter function for all the built-in validators (email, minLength, etc) returns undefined if the model value is invalid. As a result:
the model remains in an invalid state
the corresponding ngForm and ngModel controllers have $invalid === true
a validation error message is displayed to the user (depending on the application)
the form field is totally empty, so the user is left scratching their head as to the cause of the problem 😕
The validators should return the invalid value "as-is" and allow the user to see and correct it. I am happy to work up a patch if the Angular team agrees with this suggested behavior.
Activity
jbdeboer commentedon Sep 1, 2013
Dupe of #2841 (lower issue numbers win)