How to make django form.errors display only error and not input field affected

Question:

enter image description hereBasically, what I am trying to achieve is to remove the name of the input field which in this case is tel and display only the error message using {{ form.errors }}

Asked By: Olasubomi

||

Answers:

Errors are also listed by field in the form, so you can loop through with this to avoid mentioning the fieldname:

{% for field in form %}
   {% for error in field.errors %}
        {{ error }}<br>
   {% endfor %}
{% endfor %}
Answered By: SamSparx
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.