<p dir="auto">I have embedded form type with validation group which is important for parent form, but according to this <a href="http://symfony.com/doc/current/reference/forms/types/form.html#cascade-validation" rel="nofollow">http://symfony.com/doc/current/reference/forms/types/form.html#cascade-validation</a> it's not considered. Is there some way to force it's usage?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CurrencyBundle\Entity\Price:
    constraints:
        - CurrencyBundle\Validator\Constraints\OptionalPrice:
            groups: [Optional]
    properties:
        value:
            - NotBlank:
                groups: [Default]
            - Type:
                groups: [Default, Optional]
                type: numeric
            - Range:
                groups: [Default, Optional]
                min: 0
        currency:
            - NotBlank:
                groups: [Default]
            - Currency:
                groups: [Default, Optional]

RFPBundle\Entity\Request:
    properties:
        requestProducts:
            - Valid: ~

RFPBundle\Entity\RequestProduct:
    properties:
        requestProductItems:
            - Valid: ~

RFPBundle\Entity\RequestProductItem:
    properties:
        price:
            - Valid: ~


class RequestProductItemType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            -&gt;add(
                'price',
                PriceType::NAME,
                [
                    'currency_empty_value' =&gt; null,
                    'label' =&gt; 'rfp.requestproductitem.price.label',
                    'validation_groups' =&gt; ['Optional'],
                ]
            );
}"><pre class="notranslate"><code class="notranslate">CurrencyBundle\Entity\Price:
    constraints:
        - CurrencyBundle\Validator\Constraints\OptionalPrice:
            groups: [Optional]
    properties:
        value:
            - NotBlank:
                groups: [Default]
            - Type:
                groups: [Default, Optional]
                type: numeric
            - Range:
                groups: [Default, Optional]
                min: 0
        currency:
            - NotBlank:
                groups: [Default]
            - Currency:
                groups: [Default, Optional]

RFPBundle\Entity\Request:
    properties:
        requestProducts:
            - Valid: ~

RFPBundle\Entity\RequestProduct:
    properties:
        requestProductItems:
            - Valid: ~

RFPBundle\Entity\RequestProductItem:
    properties:
        price:
            - Valid: ~


class RequestProductItemType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            -&gt;add(
                'price',
                PriceType::NAME,
                [
                    'currency_empty_value' =&gt; null,
                    'label' =&gt; 'rfp.requestproductitem.price.label',
                    'validation_groups' =&gt; ['Optional'],
                ]
            );
}
</code></pre></div>
<p dir="auto">I have an entity where I'm using the following validators:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
 * @Assert\Callback(methods={&quot;isValid&quot;}, groups={&quot;group1&quot;, &quot;group2&quot;})
 */
class UserProduct
{
    /**
     * @var string $title
     * @Assert\NotBlank(message=&quot;title.blank&quot;, groups={&quot;group1&quot;, &quot;group2&quot;});
     */
    private $title;

    /**
     * @var Project\AuthenticationBundle\Entity\User
     * @Assert\Valid(groups={&quot;group2&quot;});
     */
    private $user;"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * @Assert\Callback(methods={"isValid"}, groups={"group1", "group2"})</span>
<span class="pl-c"> */</span>
<span class="pl-k">class</span> <span class="pl-v">UserProduct</span>
{
    <span class="pl-c">/**</span>
<span class="pl-c">     * @var string $title</span>
<span class="pl-c">     * @Assert\NotBlank(message="title.blank", groups={"group1", "group2"});</span>
<span class="pl-c">     */</span>
    <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>title</span>;

    <span class="pl-c">/**</span>
<span class="pl-c">     * @var Project\AuthenticationBundle\Entity\User</span>
<span class="pl-c">     * @Assert\Valid(groups={"group2"});</span>
<span class="pl-c">     */</span>
    <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>user</span>;</pre></div>
<p dir="auto">Calling <code class="notranslate">$this-&gt;get('validator')-&gt;validate($userProduct, array('group1'))</code> asserts the class constraint (<code class="notranslate">@Assert\Callback</code>) and the <code class="notranslate">$title</code> property but also the <code class="notranslate">$user</code> one too, even though it's not included in the validation group. The same happens if no groups are passed to the <code class="notranslate">Valid</code> constraint.</p>
<p dir="auto">Removing the <code class="notranslate">@Assert\Valid()</code> constraint and running the same validation again for <code class="notranslate">group1</code> does not assert the <code class="notranslate">$user</code> property, as expected.</p>
<p dir="auto">The <code class="notranslate">MemberMetadata</code> class appears to always force the cascading of the <code class="notranslate">Valid</code> constraint, although I'm unsure if this is exactly related to the issue I'm experiencing.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Symfony\Component\Validator\Mapping\MemberMetadata.php
        if ($constraint instanceof Valid) {
            $this-&gt;cascaded = true;
            $this-&gt;collectionCascaded = $constraint-&gt;traverse;
        } else {
            parent::addConstraint($constraint);
        }"><pre class="notranslate"><code class="notranslate">// Symfony\Component\Validator\Mapping\MemberMetadata.php
        if ($constraint instanceof Valid) {
            $this-&gt;cascaded = true;
            $this-&gt;collectionCascaded = $constraint-&gt;traverse;
        } else {
            parent::addConstraint($constraint);
        }
</code></pre></div>
<p dir="auto">Running on Symfony2 master.</p>