[Form][Validator] FormTypeValidatorExtension #3983

Closed
kor3k opened this Issue Apr 18, 2012 · 2 comments

Comments

Projects
None yet
3 participants
Contributor

kor3k commented Apr 18, 2012

in

src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml

change

    <!-- FormTypeValidatorExtension -->
    <service id="form.type_extension.field" class="Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension">
        <tag name="form.type_extension" alias="field" />
        <argument type="service" id="validator" />
    </service>

to

    <!-- FormTypeValidatorExtension -->
    <service id="form.type_extension.form" class="Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension">
        <tag name="form.type_extension" alias="form" />
        <argument type="service" id="validator" />
    </service>

fabpot added a commit that referenced this issue Apr 18, 2012

merged branch vicb/FormTypeValidatorExtension_fix (PR #3984)
Commits
-------

99ec873 [Form] Fix the FormTypeValidatorExtension (required by PR 3923)

Discussion
----------

[Form] Fix the FormTypeValidatorExtension (required by PR 3923)

Thanks to @jrfish for the fix (#3983)

@fabpot fabpot closed this Apr 18, 2012

Contributor

Abhoryo commented Jun 23, 2012

@vicb does that mean we have to change all ours <tag name="form.type_extension" alias="field" /> to <tag name="form.type_extension" alias="form" /> ?

In Symfony 2.0, I use an alias field like this extension.

In 2.1, I've update the signature of the methods and use setDefaultOptions method and I've got this error:

The option "label_prefix" does not exist. Known options are: ...

When I change the alias to form. I don't have this error but the behavior is not the same as the alias field.

Can you give me a hint?

Contributor

Abhoryo commented Jun 24, 2012

No need to answer, I found myself after looking into the code directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment