Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.4.x] Fixed #14885 - Clarified that ModelForm cleaning may not full…

…y complete if the form is invalid.

Thanks Ben Sturmfels for the patch.

Backport of 3fd89d9 from master.
  • Loading branch information...
commit 42aee6ffe5f16852347e0cf069447950e9d2ef85 1 parent b05d2f5
@timgraham timgraham authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 docs/topics/forms/modelforms.txt
View
11 docs/topics/forms/modelforms.txt
@@ -200,10 +200,13 @@ The ``is_valid()`` method and ``errors``
----------------------------------------
The first time you call ``is_valid()`` or access the ``errors`` attribute of a
-``ModelForm`` triggers form validation as well as :ref:`model validation
-<validating-objects>`. This has the side-effect of cleaning the model you pass
-to the ``ModelForm`` constructor. For instance, calling ``is_valid()`` on your
-form will convert any date fields on your model to actual date objects.
+``ModelForm`` triggers :ref:`form validation <form-and-field-validation>` as
+well as :ref:`model validation <validating-objects>`. This has the side-effect
+of cleaning the model you pass to the ``ModelForm`` constructor. For instance,
+calling ``is_valid()`` on your form will convert any date fields on your model
+to actual date objects. If form validation fails, only some of the updates
+may be applied. For this reason, you'll probably want to avoid reusing the
+model instance.
The ``save()`` method
Please sign in to comment.
Something went wrong with that request. Please try again.