display-form-errors.html 250 Bytes
Newer Older
1 2
{% if form.errors %}
  <div class="alert alert-danger">
3
    {% for field in form %}
4 5 6 7 8 9
      {% if field.errors %}
      <div><strong>{{ field.label }}</strong>: {{ field.errors|striptags }}</div>
      {% endif %}
    {% endfor %}
  </div>
{% endif %}