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
* schemaFormValidate used model value for validation, so any ordinary validation message got changed to "required".
This was since we validated the model value, we can't validate the viewValue since numbers wouldn't work. So we
set the viewValue again to trigger parsers. This works fine in Angular 1.2 and in 1.3 it solves the problem, but
introduces another. When setting the viewValue `undefined` in 1.2 we get a nice "required", but in 1.3 parsers
aren't even called. So we add an extra check with required and ngModel.$isEmpty()
* In Angular 1.3 returning undefined from a parser automatically tacks on a 'parse' error. Instead we always return
the viewValue and later in a special validator ('schemaForm') stop the model from getting updated. 'schemaForm'
error gets filtered so it never hits the forms. In Angular 1.2 we return undefined since that doesn't tack on a
'parse' error.
0 commit comments