{% 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 %}