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