{% load i18n frontend_forms_tags %} {% with num_form_errors=form.errors|length num_form_non_field_errors=form.non_field_errors|length %} {% if num_form_errors|add:num_form_non_field_errors == 1 %}
{% trans 'Please correct the error below.' %}
{% elif num_form_errors|add:num_form_non_field_errors > 1 %}{% trans 'Please correct the errors below.' %}
{% endif %} {% endwith %} {% if FORM_LAYOUT_FLAVOR == "generic" %} {% if form.non_field_errors %}