Skip to content

Commit 84b8836

Browse files
committed
Fixed form errors for comment
1 parent 0cdb928 commit 84b8836

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/Resources/views/blog/comment_form.html.twig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
<fieldset>
99
<legend>{{ 'title.add_comment'|trans }}</legend>
1010

11-
<div class="form-group">
11+
<div class="form-group{% if not form.vars.valid %} has-error{% endif %}">
1212
{{ form_label(form.content, 'Content', { label_attr: { class: 'hidden' }}) }}
1313

1414
{% if not form.vars.valid %}
15-
<div class="alert alert-danger form-error">
16-
{{ form_errors(form.content) }}
17-
</div>
15+
{{ form_errors(form.content) }}
1816
{% endif %}
1917

2018
{{ form_widget(form.content, { attr: { rows: 10 } }) }}

0 commit comments

Comments
 (0)