-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Add the html5 option to ColorType to validate the input #36302
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
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.
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
Color
constraint is dedicated to the HTML5 input type="color".