Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] collect all transformation failures#37345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedJun 18, 2020
| Q | A |
|---|---|
| Branch? | 3.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix#37262 |
| License | MIT |
| Doc PR |
b82ff49 toa18a78dCompare| $this->assertCount(2,$form->getErrors()); | ||
| $this->assertSame('This value is not valid.',$form->getErrors()[0]->getMessage()); | ||
| $this->assertSame('This value is not valid.',$form->getErrors()[1]->getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wonder why this error is added twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Once for the month and once for the year
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The removedcontinue is responsible for it. Maybe we should keep it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hah, true. I didn't notice the invalid month. Was focused on the year only due to my initial test. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should the cause of the error be tested as well then? To ensure one is really caused by the month and one by the year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
3.4.40 also adds two errors in this case so it should be fine to keep that behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should the cause of the error be tested as well then? To ensure one is really caused by the month and one by the year.
Yes, totally makes sense. I did that.
016b3d5 to519ab16Comparefabpot commentedJun 20, 2020
Thank you@xabbuh. |