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

docs(input): ngPattern validates against view value #13376

Closed
wants to merge 1 commit into from

Conversation

melbourne2991
Copy link
Contributor

ngPattern doesn't validate modelValue any more, it validates the viewValue. (https://github.com/angular/angular.js/pull/12640/files#diff-fd9d2cc2d19609321aa0bd5cfa6b3444R46).

I think it's worth mentioning explicitly, reading "ngModel value", I assumed it was referring to the modelValue.

ngPattern doesn't validate model value any more, it validates the viewValue. I think it's worth mentioning explicitly, I was removing whitespace in a $parser but because the parser was modifying the modelValue and not the viewValue the pattern was coming up invalid - reading the docs I made the assumption that the ng pattern was reading the modelValue, it was only until I dug into angular's source I realised this wasn't the case.

https://github.com/angular/angular.js/pull/12640/files#diff-fd9d2cc2d19609321aa0bd5cfa6b3444R46
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@melbourne2991
Copy link
Contributor Author

I signed it!

On Wednesday, 25 November 2015, googlebot [email protected] wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).

[image: 📝] Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll

verify. Thanks.


Reply to this email directly or view it on GitHub
#13376 (comment).

@googlebot
Copy link

CLAs look good, thanks!

@Narretz Narretz self-assigned this Nov 26, 2015
@Narretz Narretz closed this in 0bc2754 Nov 26, 2015
@Narretz
Copy link
Contributor

Narretz commented Nov 26, 2015

Thanks for the heads-up! This was wrong in a few other places, so I fixed it with another commit.

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.

3 participants