mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +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:
parent
a00efa30d6
commit
11f0899bbe
10 changed files with 120 additions and 17 deletions
|
|
@ -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
|
||||
------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue