Skip to content

Commit

Permalink
Fixed #12643 -- Added link to the ModelForm documentation clarifying …
Browse files Browse the repository at this point in the history
…the special requirements of a clean() method on a modelform. Thanks to fgaudin for the report, and ptone for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed May 9, 2010
1 parent 55d65d3 commit 5a74f0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/ref/forms/validation.txt
Expand Up @@ -92,6 +92,11 @@ overridden:
errors to a specific field in the form, you will need to access the errors to a specific field in the form, you will need to access the
``_errors`` attribute on the form, which is `described later`_. ``_errors`` attribute on the form, which is `described later`_.


Also note that there are special considerations when overriding
the ``clean()`` method of a ``ModelForm`` subclass. (see the
:ref:`ModelForm documentation
<overriding-modelform-clean-method>` for more information)

These methods are run in the order given above, one field at a time. That is, These methods are run in the order given above, one field at a time. That is,
for each field in the form (in the order they are declared in the form for each field in the form (in the order they are declared in the form
definition), the ``Field.clean()`` method (or its override) is run, then definition), the ``Field.clean()`` method (or its override) is run, then
Expand Down

0 comments on commit 5a74f0c

Please sign in to comment.