I have a form and I want to display the errors in a for loop.
{% for error in form.errors %}
<tr><td>{{ error }}</td></tr>
{% endfor %}
By doing this the {{ error }} only contains the field name that has an error, but not the error message. How can I display the error message?
You can get all field errors in a form like this:
Or for a specific field:
More Infos here: https://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template