I override form_div_layout.html.twig in my package:
{% block form_errors %} {% spaceless %} {% set a = false %} {% for child in form.children %} {% if child.get("errors") %} {% set a = 'true' %} {% endif %} {% endfor %} {% if a == true %} <div class="alert"> {% for children in form.children %} {{ form_errors(children) }} {% endfor %} </div> {% endif %} {% if errors|length > 0 %} <ul> {% for error in errors %} {{ error.messagePluralization is null ? error.messageTemplate|trans(error.messageParameters, 'validators') : error.messageTemplate|transchoice(error.messagePluralization, error.messageParameters, 'validators') }} {% endfor %} </ul> {% endif %} {% endspaceless %} {% endblock form_errors %}
Now, if the entry form_errors(form) displays the entire error in the form and the error above each field, also indicates.
korvinko
source share