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 has been archived by the owner on Apr 12, 2024. It is now read-only.
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.
The
$formatter
function for all the built-in validators (email
,minLength
, etc) returnsundefined
if the model value is invalid. As a result:$invalid === true
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.
Demo page here: http://plnkr.co/EneUPt
The text was updated successfully, but these errors were encountered: