diff --git a/budget/templates/display_errors.html b/budget/templates/display_errors.html index 15039a2..bc65a3a 100644 --- a/budget/templates/display_errors.html +++ b/budget/templates/display_errors.html @@ -1,5 +1,5 @@ -{% for errors in form.errors.values() %} - {% for error in errors %} -

{{error}}

+{% for field_name, field_errors in form.errors.items() if field_errors %} + {% for error in field_errors %} +

{{ form[field_name].label.text }}: {{ error }}

{% endfor %} {% endfor %}