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

docs(input): Removed invalid statement #6081

Closed
wants to merge 1 commit into from
Closed

docs(input): Removed invalid statement #6081

wants to merge 1 commit into from

Conversation

ProLoser
Copy link
Contributor

@ProLoser ProLoser commented Feb 1, 2014

$parsers should return values regardless of validity to allow chaining validation.

If a $parser returns undefined then sequential parsers will all automatically fail and the validation message feedback will be inaccurate.

See this discussion: angular-ui/ui-utils#149

$parsers should return values regardless of validity to allow chaining validation
@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@caitp
Copy link
Contributor

caitp commented Feb 2, 2014

The intended behaviour is that the parsed value becomes undefined, and therefore the model value is undefined, indicating an invalid value. This should not harm other validators in the chain, because they should ignore values deemed empty by ngModelController.$isEmpty(value), which should account for the undefined case. (The exception to this would be the ngRequired validator, but its parser is unshifted onto the parser array and so should be evaluated early)

@tbosch tbosch self-assigned this Feb 5, 2014
@tbosch
Copy link
Contributor

tbosch commented Feb 5, 2014

Well, you can't parse invalid values, e.g. parse a non numeric value as a numeric value would just not work. So I think this should stay here...

@tbosch tbosch closed this Feb 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants