<p dir="auto">This is an issue being there since 2.1.</p>
<p dir="auto">The FormValidator runs the validation of the underlying object graph in 2 cases:</p>
<ul dir="auto">
<li>on the root form</li>
<li>in case all parents have <code class="notranslate">cascade_validation</code> set to <code class="notranslate">true</code></li>
</ul>
<p dir="auto">This means that when you have a subform with <code class="notranslate">mapped</code> set to <code class="notranslate">false</code>, the only way to have its object graph validation is to enable <code class="notranslate">cascade_validation</code> on all parents of the unmapped field, which will lead to duplicate validation of the object graph of the parent if it uses <code class="notranslate">@Assert\Valid()</code> properly.</p>
<p dir="auto">As unmapped forms define a new object graph, I think it would make sense to run the validation on them as well.</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/webmozart/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/webmozart">@webmozart</a></p>
<p dir="auto">SF 2.5.2 - after upgrade from 2.4<br>
Validation in fallback mode</p>
<p dir="auto">After submit form with errors (fields: text, datetime, collection + some assertions via annotations)<br>
I'm going to webprofiler -&gt; form</p>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Key &quot;id&quot; for array with keys &quot;submitted_data, errors, synchronized, children&quot; does not exist in @WebProfiler/Collector/form.html.twig at line 417
500 Internal Server Error - Twig_Error_Runtime "><pre class="notranslate"><code class="notranslate">Key "id" for array with keys "submitted_data, errors, synchronized, children" does not exist in @WebProfiler/Collector/form.html.twig at line 417
500 Internal Server Error - Twig_Error_Runtime 
</code></pre></div>