{% set FLASH_MESSAGE_DATA = { "message": { "css": "primary", "icon": "chat-text", }, "info": { "css": "info", "icon": "info-square", }, "warning": { "css": "warning", "icon": "exclamation-triangle", }, "error": { "css": "danger", "icon": "x-octagon", }, "success": { "css": "success", "icon": "check-circle", }, } %} {% macro _display_validation_errors() %} {% set validation_errors = session.pop("_validation_errors", {}) %} {% if validation_errors|length > 0 %}
Validation errors
{% set general_errors = validation_errors.pop("_general", []) %} {% if general_errors | length > 0 %} {% for general_error in general_errors %}{{ general_error }}
{% endfor %} {% endif %}{{ field_error_info }}
{% endfor %} {% endfor %} {% else %} {% for field_error in field_errors %}{{ field_error }}
{% endfor %} {% endif %}