summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick Presta <nick@nickpresta.ca>2014-04-14 23:58:51 -0400
committerTim Graham <timograham@gmail.com>2014-06-02 15:22:15 -0400
commit11f0899bbe7c04dc6109f57c3b36ed8621b8f08e (patch)
tree92bbc93a67159d5c418ae128598de4b6db326b52 /docs
parenta00efa30d6e5ca220b914415904fff5fa0a6f2c5 (diff)
Fixed #11776 -- Added CSS class for non-field/top of form errors.
Thanks Daniel Pope for the suggestion.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.8.txt4
-rw-r--r--docs/topics/forms/index.txt11
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 056ea86baf..f716c995ca 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -129,6 +129,10 @@ Forms
the ``<label>`` tags for required fields will have this class present in its
attributes.
+* The rendering of non-field errors in unordered lists (``<ul>``) now includes
+ ``nonfield`` in its list of classes to distinguish them from field-specific
+ errors.
+
* :class:`~django.forms.Field` now accepts a
:attr:`~django.forms.Field.label_suffix` argument, which will override the
form's :attr:`~django.forms.Form.label_suffix`. This enables customizing the
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
index f3afac5ab9..8db24f68d0 100644
--- a/docs/topics/forms/index.txt
+++ b/docs/topics/forms/index.txt
@@ -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
------------------------------