[Django]-Django all-auth Form errors not displaying

6👍

Make sure to check for {{form.non_field_errors}} in addition to errors attached to specific fields.

7👍

if any one still having problem then you can use this one

{% if form.errors %}
{% for field in form %}
    {% for error in field.errors %}
        <div class="alert alert-error">
            <strong>{{ error|escape }}</strong>
        </div>
    {% endfor %}
{% endfor %}
{% for error in form.non_field_errors %}
    <div class="alert alert-error">
        <strong>{{ error|escape }}</strong>
    </div>
{% endfor %}
{% endif %}

Leave a comment