[Validator] Regression to set false
to htmlPattern
in Regex
constraint
#57286
Labels
false
to htmlPattern
in Regex
constraint
#57286
Symfony version(s) affected
5.2, 5.3, 5.4, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1, 7.2
Description
When methods have been typed, we have lost the ability to set
false
tohtmlPattern
since symfony 5.2:string|boolean|null
is written in the documentation: https://symfony.com/doc/current/reference/constraints/Regex.html#htmlpatternHow to reproduce
Possible Solution
We need to fix:
htmlPattern
of method__construct()
from?string
tostring|bool|null
htmlPattern
from?string
tostring|bool|null
getHtmlPattern
introduces in symfony/validator@4eed24f about useless empty instruction (or better, i guess, returnnull
ifhtmlPattern
is identical tofalse
)Additional Context
Workaround in FormType:
The text was updated successfully, but these errors were encountered: