Skip to content

Commit 6a7bb97

Browse files
committed
bug #28731 [Form] invalidate forms on transformation failures (xabbuh)
This PR was merged into the 2.8 branch. Discussion ---------- [Form] invalidate forms on transformation failures | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20916, #21242, #28584 | License | MIT | Doc PR | Commits ------- 385d9df29c invalidate forms on transformation failures
2 parents d93ad84 + 010dad3 commit 6a7bb97

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Resources/config/form.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@
166166
<tag name="form.type" alias="currency" />
167167
</service>
168168

169+
<service id="form.type_extension.form.transformation_failure_handling" class="Symfony\Component\Form\Extension\Core\Type\TransformationFailureExtension">
170+
<tag name="form.type_extension" extended-type="Symfony\Component\Form\Extension\Core\Type\FormType" />
171+
<argument type="service" id="translator" on-invalid="ignore" />
172+
</service>
173+
169174
<!-- FormTypeHttpFoundationExtension -->
170175
<service id="form.type_extension.form.http_foundation" class="Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension">
171176
<argument type="service" id="form.type_extension.form.request_handler" />

0 commit comments

Comments
 (0)