8000 [Console] Different behaviour for key and value inputs in case of "." character · Issue #22706 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Console] Different behaviour for key and value inputs in case of "." character #22706
Closed
@maks-rafalko

Description

@maks-rafalko
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? yes
Symfony version ^3.2

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.:

    [1] .
    [2] app
    [3] src

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 returns array(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:

  • allowing some range of special characters in the regular expression
  • allow providing custom regular expression
  • something else

(I want to contribute for the first time to Symfony so directions/advices are much appreciated)

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0