<div class="d-flex justify-content-between align-items-center">
    <h2 class="mt-3">
        {{ data.errors|length }} 
        {% if data.errors|length == 1 %}
            {{ _('Error') }}
        {% else %}
            {{ _('Errors') }}
        {% endif %}
    </h2>
    <div>
        {% if data.errors|length %}
            <form action="">
                <button class="btn btn-primary" type="submit" name="drop_errors" value="true">{{ _('Clear Errors') }}</button>
            </form>
        {% endif %}
    </div>
</div>
{% if data.errors|length %}
<div class="list-group">
    {% for error in data.errors|reverse %}
        {% set even = loop.index % 2 == 0 %}
        <div class="list-group-item p-3 {% if even %} list-group-item-secondary {% endif %}">
            <pre class="pb-3 mb-0">{{ error }}</pre>
        </div>
    {% endfor %}
</div>
{% else %}
    <p>
        You don't have any errors yet.
    </p>
    <p>
        If the error should be displayed, make sure that changes mentioned in <b>Enable Errors Saving</b> section are being applied.
    </p>
{% endif %}