[Form] Added FieldTypeValidatorExtension and fixed FQCN of DelegatingValidator

This commit is contained in:
Tobias Naumann 2011-04-24 00:59:43 +02:00
parent 81deedfc1b
commit bc9817c85e
2 changed files with 8 additions and 2 deletions

View File

@ -21,7 +21,7 @@
<!--
We don't need to be able to add more extensions.
* more types can be registered with the form.type tag
* more type_guessers can be registered with the form.type.type_guesser tag
* more type_guessers can be registered with the form.type.type_guesser tag
-->
<argument type="service" id="form.extension" />
</argument>
@ -148,6 +148,12 @@
<tag name="form.type" alias="url" />
</service>
<!-- FieldTypeValidatorExtension -->
<service id="form.type_extension.field" class="Symfony\Component\Form\Extension\Validator\Type\FieldTypeValidatorExtension">
<tag name="form.type_extension" alias="field" />
<argument type="service" id="validator" />
</service>
<!-- CsrfExtension -->
<service id="form.type.csrf" class="Symfony\Component\Form\Extension\Csrf\Type\CsrfType">
<tag name="form.type" alias="csrf" />

View File

@ -7,7 +7,7 @@
<class name="Symfony\Component\Form\Form">
<constraint name="Callback">
<value>
<value>Symfony\Component\Form\Extension\Core\Validator\DelegatingValidator</value>
<value>Symfony\Component\Form\Extension\Validator\Validator\DelegatingValidator</value>
<value>validateFormData</value>
</value>
</constraint>