{% if form.errors %} <div id="form-error"> <p>The operation could not be performed because one or more error(s) occurred.<br />Please resubmit the form after making the following changes:</p> <ul> {% for field in form %} <li>{{ field.errors|striptags }}</li> {% endfor %} </ul> </div> {% endif %}