[Form] Add the html5 option to ColorType to validate the input#36302
[Form] Add the html5 option to ColorType to validate the input#36302fabpot merged 1 commit intosymfony:masterfrom
Conversation
There was a problem hiding this comment.
What about a strict_html5 option in a ColorValidatorTypeExtension for the ColorType that adds it with a normalizer automatically?
|
Constraints should not be implemented in the Form component IMO. |
|
So a solution could be to use the normalizer to add a |
But then we should not require the Validator component for such option, add do it in the |
|
I agree, this could simply be part of the |
31b82a2 to
0f352fb
Compare
|
I took your ideas into consideration. That's kind of out of my initial use case but it's still going to be useful.
AFAIK, that's already the case. |
Should we however add a RegExp constraint (and skip the listener) if the Validator component is there? |
0f352fb to
caead2d
Compare
889c936 to
56fd5d5
Compare
56fd5d5 to
454b6ff
Compare
|
Thank you @fancyweb. |
Continuation of #35626.
I'm resubmitting the initial implementation, this time in the Form component.
This
Colorconstraint is dedicated to the HTML5 input type="color".