[1.7.x] Removed confusing paragraph from the docs.

This snippet wasn't particularly helpful as `add_error()` is described
in greater details in the following section.

Thanks Claude Paroz for the report.

Backport of f1f0c4f16b from master
This commit is contained in:
Loic Bistuer 2014-11-05 16:00:22 +07:00
parent 109719a9cb
commit 0e03d4618b
1 changed files with 0 additions and 7 deletions

View File

@ -328,13 +328,6 @@ write a cleaning method that operates on the ``recipients`` field, like so::
# not. # not.
return data return data
Sometimes you may want to add an error message to a particular field from the
form's :meth:`~Form.clean()` method, in which case you can use
:meth:`~django.forms.Form.add_error()`. Note that this won't always be
appropriate and the more typical situation is to raise a ``ValidationError``
from , which is turned into a form-wide error that is available through the
:meth:`Form.non_field_errors() <django.forms.Form.non_field_errors>` method.
.. _validating-fields-with-clean: .. _validating-fields-with-clean:
Cleaning and validating fields that depend on each other Cleaning and validating fields that depend on each other