-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Form] Fixed ChoiceType trim option #9598
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed trimming choice values | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24247, #24712 | License | MIT | Doc PR | symfony/symfony-docs#9598 Follows #24712 discussion. Commits ------- 00cdf5e [Form] Fixed trimming choice values
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.
Nice! Thanks Jules.
Thank you for the rewording 👍 |
reference/forms/types/choice.rst
Outdated
@@ -323,6 +324,14 @@ error_bubbling | |||
Set that error on this field must be attached to the field instead of | |||
the parent field (the form in most cases). | |||
|
|||
trim | |||
~~~~ |
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 think we should move the description to its own file to be able to reuse it in other form types. This is currently missing in some documents (see the failing build).
reference/forms/types/choice.rst
Outdated
@@ -30,6 +30,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op | |||
| Overridden | - `compound`_ | | |||
| options | - `empty_data`_ | | |||
| | - `error_bubbling`_ | | |||
| | - `choice_type_trim`_ | |
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.
here we would still have to use trim
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.
Was not sure ^^. Fixed, thanks!
**type**: ``boolean`` **default**: ``false`` | ||
|
||
Trimming is disabled by default because the selected value or values must match | ||
the given choice values exactly (and they could contain white spaces). |
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.
"whitespaces" (without the space)?
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.
Agreed, fixed. Thanks again!
Thanks Jules. |
…uiluz) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed ChoiceType trim option Ref symfony/symfony#26932. Commits ------- 2dd6c56 fixup typo 360066d fixup option links 6631665 fixup @xabbuh's comment proper choice type trim file 8bfa059 Reword bbca3b0 [Form] Fixed ChoiceType trim option
Ref symfony/symfony#26932.