Show all form errors

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{% if form.errors %}
	<!-- Error messaging -->
	<div id="errors">
		<div class="inner">
			<p>There were some errors in the information you entered. Please correct the following:</p>
			{{ form.non_field_errors }}
			<ul>
				{% for field in form %}
					{% if field.errors %}<li>{{ field.label }}: {{ field.errors|striptags }}</li>{% endif %}
				{% endfor %}
			</ul>
		</div>
	</div>
	<!-- /Error messaging -->
{% endif %}

More like this

  1. Nice form errors by SmileyChris 4 years, 6 months ago
  2. List all Form Errors by epicserve 5 years, 6 months ago
  3. List all errors in a form +bootstrap highlighting by ibrahimlawal 1 year, 7 months ago
  4. tag: render form field by crucialfelix2 4 years, 4 months ago
  5. Trying to filter the contents of a ChoisceField by Barcelo 2 years, 5 months ago

Comments

(Forgotten your password?)