Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngModel parse errors always use named parser #10076

Description

@Narretz

For our core parsers, we use a private / undocumented property called $$parserName, so that the $error is named, e.g. $error.date. Other parsers will always set $error.parse. When you have something like this:

<input type="date" my-parser ng-model="asdf"/>

where myParser adds:

ctrl.$parsers.push(function() {
  return undefined;
});

the $error will nevertheless be date, because the $$parserName is set in the link function, and $$runValidators will always use the $$parserName if it is set.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions