Skip to content

Commit 50d8470

Browse files
committed
feature #36302 [Form] Add the html5 option to ColorType to validate the input (fancyweb)
This PR was merged into the 5.1-dev branch. Discussion ---------- [Form] Add the html5 option to ColorType to validate the input | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | no | License | MIT | Doc PR | TODO Continuation of symfony/symfony#35626. I'm resubmitting the initial implementation, this time in the Form component. This `Color` constraint is dedicated to the HTML5 input type="color". Commits ------- 454b6ff48b [Form] Add the html5 option to ColorType to validate the input
2 parents 577b268 + 3c4cf5c commit 50d8470

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Resources/config/form.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
<tag name="form.type" />
7575
<argument type="service" id="translator" on-invalid="ignore" />
7676
</service>
77+
<service id="form.type.color" class="Symfony\Component\Form\Extension\Core\Type\ColorType">
78+
<tag name="form.type" />
79+
<argument type="service" id="translator" on-invalid="ignore" />
80+
</service>
7781

7882
<service id="form.type_extension.form.transformation_failure_handling" class="Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension">
7983
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\FormType" />

0 commit comments

Comments
 (0)