{% if form.errors %} <div class="alert alert-error"> <button type="button" class="close" data-dismiss="alert">×</button> {% for field in form %} {% if field.errors %} <li>{{ field.label }}: {{ field.errors|striptags }}</li> {% endif %} {% endfor %} </div> {% endif %}