Right now my errors theme looks like this:
{% form_theme form _self %}
{% block form_errors %}
{% for child in form %}
{% for error in child.vars.errors %}
<div class="alert alert-danger fade in margin-bottom-40">
<h4>{{ child.vars.label|trans }}</h4>
{{ error.message|trans }}
</div>
{% endfor %}
{% endfor %}
{% endblock form_errors %}
and this is fine until I add error to the whole entity, not to particular field. My validator is doing something like this:
$this->context->buildViolation($constraint->message)
->addViolation();
Then the error message isn't shown, what is obvious.
What I want to do is to keep current schema of showing errors associated with fields and add something similar to errors for whole entity/form. Do You guys have any ideas?