<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.4.4</td>
</tr>
</tbody>
</table>
<p dir="auto">Currently the theme bootstrap_4_layout.html.twig renders checkboxes like that</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;form-check&quot;&gt;
    &lt;label class=&quot;form-check-label&quot;&gt;
        &lt;input type=&quot;checkbox&quot; id=&quot;defaultCheck1&quot; name=&quot;anyname&quot; class=&quot;form-check-input&quot; value=&quot;1&quot;&gt; Default checkbox
    &lt;/label&gt;
&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">form-check</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">label</span> <span class="pl-c1">class</span>="<span class="pl-s">form-check-label</span>"<span class="pl-kos">&gt;</span>
        <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">id</span>="<span class="pl-s">defaultCheck1</span>" <span class="pl-c1">name</span>="<span class="pl-s">anyname</span>" <span class="pl-c1">class</span>="<span class="pl-s">form-check-input</span>" <span class="pl-c1">value</span>="<span class="pl-s">1</span>"<span class="pl-kos">&gt;</span> Default checkbox
    <span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">But the bootstrap 4 documentation has the following structure</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;form-check&quot;&gt;
  &lt;input class=&quot;form-check-input&quot; type=&quot;checkbox&quot; value=&quot;&quot; id=&quot;defaultCheck1&quot;&gt;
  &lt;label class=&quot;form-check-label&quot; for=&quot;defaultCheck1&quot;&gt;
    Default checkbox
  &lt;/label&gt;
&lt;/div&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">form-check</span>"<span class="pl-kos">&gt;</span>
  <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">class</span>="<span class="pl-s">form-check-input</span>" <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">value</span>="" <span class="pl-c1">id</span>="<span class="pl-s">defaultCheck1</span>"<span class="pl-kos">&gt;</span>
  <span class="pl-kos">&lt;</span><span class="pl-ent">label</span> <span class="pl-c1">class</span>="<span class="pl-s">form-check-label</span>" <span class="pl-c1">for</span>="<span class="pl-s">defaultCheck1</span>"<span class="pl-kos">&gt;</span>
    Default checkbox
  <span class="pl-kos">&lt;/</span><span class="pl-ent">label</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">The same logic for radio buttons</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4</td>
</tr>
</tbody>
</table>
<p dir="auto">Hi!</p>
<p dir="auto">I'm not sure if it is a bug or intentional, but in bootstrap4 form layout the validation errors are rendered inside the label tag see:<br>
<a href="https://github.com/symfony/twig-bridge/blob/master/Resources/views/Form/bootstrap_4_layout.html.twig#L206">https://github.com/symfony/twig-bridge/blob/master/Resources/views/Form/bootstrap_4_layout.html.twig#L206</a></p>
<p dir="auto">It's not exactly how bootstrap recommends it.<br>
<a href="https://getbootstrap.com/docs/4.0/components/forms/#validation" rel="nofollow">https://getbootstrap.com/docs/4.0/components/forms/#validation</a></p>
<p dir="auto">Regards,<br>
Marton</p>