-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
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. |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
Thanks for the PR, but please stay constructive. So you're saying the bug happens because the validators get reattached to the ngModel every time the element is recreate by ngIf, for example? If this is true, then the problem should affect other validators too, right? When I looked at this in #8234, it looked like the root cause might lie somewhere else. In any case, this needs a test. |
+1 @Narretz @alexeykudinkin we can't accept pull requests without test cases (it's actually very hard to review this without a test case showing what is going wrong). @matsko I wonder if your refactoring might solve this --- if we get a test case for it which is failing in master, should definitely add it to the refactor |
Sorry, didn't mean anything in person. |
@caitp, actually i wondered that there were (hardly) any tests for those type of the directive. |
Yes it should fix it. Sorry guys for not replying here earlier to keep everyone posted. |
@Narretz this is pure racing problem caused by validators being assigned (and sequentially fired) right before attr observer being attached. |
@matsko could you, please, point out the place fixing this. Scanned through your PR (https://github.com/angular/angular.js/pull/8267/files#diff-3), but hardly can find any change that may fix that. |
The big refactoring is local at the moment. Lots of broken tests and changes. I can paste a link here at the end of the day tomorrow. |
But what about ng-maxlength for input type="number" ? value.length fails at the moment....? |
@pandamouse that fix is in the works here: #7968 |
@alexeykudinkin we pushed a fix for minlength/maxlength that does this. Can you test on master and reply here if it breaks? We will reopen it if it's still broken. |
No, it's not fixed. |
I've pushed a test to show off a PoC to clarify what i see is wrong. Test indicates that model value is actually being validated twice: first during angular bootstrap (when no |
This is crappy synchronisation bug that can run you absolutely crazy trying to devise what has gone wrong with your
ngMinLength
.