<p dir="auto">I would like to know if it is possible to mix validation group and group sequence ?</p>
<p dir="auto">I used GroupSequence like this :</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" * @Assert\GroupSequence({&quot;Branch&quot;, &quot;Step2&quot;})
 * @ProjectAssert\Configuration(groups={&quot;Step2&quot;})
 */
class Branch

    // some property with validator.
    // and
    /**
     * @SensioAssert\Yaml() 
     */
    private $configurationVariables;

    /**
     * @SensioAssert\Twig()
     */
    private $configurationTemplate;"><pre class="notranslate"> * @<span class="pl-en"><span class="pl-v">Assert</span>\<span class="pl-v">GroupSequence</span></span>({"<span class="pl-s">Branch</span>", "<span class="pl-s">Step2</span>"})
 * @<span class="pl-en"><span class="pl-v">ProjectAssert</span>\<span class="pl-v">Configuration</span></span>(groups={"<span class="pl-s">Step2</span>"})
 */
<span class="pl-k">class</span> <span class="pl-v">Branch</span>

    <span class="pl-c">// some property with validator.</span>
    <span class="pl-c">// and</span>
    <span class="pl-c">/**</span>
<span class="pl-c">     * @SensioAssert\Yaml() </span>
<span class="pl-c">     */</span>
    private <span class="pl-s1"><span class="pl-c1">$</span>configurationVariables</span>;

    <span class="pl-c">/**</span>
<span class="pl-c">     * @SensioAssert\Twig()</span>
<span class="pl-c">     */</span>
    <span class="pl-k">private</span> <span class="pl-s1"><span class="pl-c1">$</span>configurationTemplate</span>;</pre></div>
<p dir="auto">And it works like a charm.</p>
<p dir="auto">But now, I want to preview the branch configuration. So I <strong>do not need</strong> validate everything. I just want to validate <code class="notranslate">configurationVariables</code> and <code class="notranslate">configurationTemplate</code> in a first step, and then the whole configuration with <code class="notranslate">ProjectAssert\Configuration</code> in a second step.</p>
<p dir="auto">So I added <code class="notranslate">groups={"preview"}</code> on <code class="notranslate">configurationVariables</code> and <code class="notranslate">configurationTemplate</code>.<br>
But I do not know how to add a group on my validation sequence.<br>
AFAIK, a POPO can attach only one GroupSequence, and a GroupSequence can not be inside a group.</p>
<p dir="auto">Currently, the API of <code class="notranslate">ValidatorInterface</code> does not support group sequences. This should be made possible by supporting the following calls:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$validator-&gt;validate($object, new GroupSequence(array('first', 'second')));
$validator-&gt;validateProperty($object, 'foo', new GroupSequence(array('first', 'second')));
$validator-&gt;validatePropertyValue('Class', 'foo', 'bar', new GroupSequence(array('first', 'second')));
$validator-&gt;validateValue($object, array($constraint1, $constraint2), new GroupSequence(array('first', 'second')));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validate</span>(<span class="pl-s1"><span class="pl-c1">$</span>object</span>, <span class="pl-k">new</span> <span class="pl-v">GroupSequence</span>(<span class="pl-en">array</span>(<span class="pl-s">'first'</span>, <span class="pl-s">'second'</span>)));
<span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validateProperty</span>(<span class="pl-s1"><span class="pl-c1">$</span>object</span>, <span class="pl-s">'foo'</span>, <span class="pl-k">new</span> <span class="pl-v">GroupSequence</span>(<span class="pl-en">array</span>(<span class="pl-s">'first'</span>, <span class="pl-s">'second'</span>)));
<span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validatePropertyValue</span>(<span class="pl-s">'Class'</span>, <span class="pl-s">'foo'</span>, <span class="pl-s">'bar'</span>, <span class="pl-k">new</span> <span class="pl-v">GroupSequence</span>(<span class="pl-en">array</span>(<span class="pl-s">'first'</span>, <span class="pl-s">'second'</span>)));
<span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validateValue</span>(<span class="pl-s1"><span class="pl-c1">$</span>object</span>, <span class="pl-en">array</span>(<span class="pl-s1"><span class="pl-c1">$</span>constraint1</span>, <span class="pl-s1"><span class="pl-c1">$</span>constraint2</span>), <span class="pl-k">new</span> <span class="pl-v">GroupSequence</span>(<span class="pl-en">array</span>(<span class="pl-s">'first'</span>, <span class="pl-s">'second'</span>)));</pre></div>