1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #11776 -- Added CSS class for non-field/top of form errors.

Thanks Daniel Pope for the suggestion.
This commit is contained in:
Nick Presta
2014-04-14 23:58:51 -04:00
committed by Tim Graham
parent a00efa30d6
commit 11f0899bbe
10 changed files with 120 additions and 17 deletions

View File

@@ -292,6 +292,17 @@ over them::
</ol>
{% endif %}
.. versionchanged:: 1.8
Non-field errors (and/or hidden field errors that are rendered at the top of
the form when using helpers like ``form.as_p()``) will be rendered with an
additional class of ``nonfield`` to help distinguish them from field-specific
errors. For example, ``{{ form.non_field_errors }}`` would look like::
<ul class="errorlist nonfield">
<li>Generic validation error</li>
</ul>
Looping over the form's fields
------------------------------