You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@borNfreee you can make a pull request to change the regular expression to allow for anything that is not whitespace or a comma. The current regex is making too many assumptions on the use case. Better to allow as much as possible for a generic class like ChoiceQuestion and when people want to limit the characters in the choices they are better of writing their own class that is specific for their problem.
…inputs in multiple choice question (borNfreee)
This PR was squashed before being merged into the 2.7 branch (closes#22718).
Discussion
----------
[Console] Fixed different behaviour of key and value user inputs in multiple choice question
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22706
| License | MIT
| Doc PR | -
Fixed a bug when value from multiple choice list could not be selected by user's input
while it could be selected by typing its index in the list.
Commits
-------
2861bd7 [Console] Fixed different behaviour of key and value user inputs in multiple choice question
Uh oh!
There was an error while loading. Please reload this page.
I would like to know if it is a real bug or intended behaviour:
I'm using
ChoiceQuestion
with choices of folders, where I can have.
and..
among other results, e.g.:When I type "." I get an error:
Value "." is invalid
because of regular expression:'/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/'
.But when I type "1", the value correctly passes validation and
ChoiceQuestion
returnsarray(1) { [0] => string(1) "."}
.I think both variant ("." and "1") should be allowed in this case.
If you think this is a bug, what would you like to see as a solution:
(I want to contribute for the first time to Symfony so directions/advices are much appreciated)
Thank you.
The text was updated successfully, but these errors were encountered: