Skip to content

Commit c438bb8

Browse files
committed
Make sure we always render errors. Eventhough labels are disabled
1 parent ce53608 commit c438bb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@
204204
{%- endif -%}
205205
{%- endif -%}
206206
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}{{- form_errors(form) -}}</{{ element|default('label') }}>
207+
{%- else -%}
208+
{%- if errors|length > 0 -%}
209+
<div id="{{ id }}_errors" class="mb-2">
210+
{{- form_errors(form) -}}
211+
</div>
212+
{%- endif -%}
207213
{%- endif -%}
208214
{%- endblock form_label %}
209215

0 commit comments

Comments
 (0)