diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-04 14:17:02 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-04 14:22:23 +0200 |
| commit | 121fd109de09ece4e263e508f9034df9b583da46 (patch) | |
| tree | 7f6c7399b2f2b8f4b0942a79726faae40f41f3ec /docs/ref/forms/validation.txt | |
| parent | 10f979fd92000de1ac9713351f5cb749e2cbca03 (diff) | |
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
cleaned_data is no longer deleted when form validation fails but only
contains the data that did validate.
Thanks to the various contributors to this patch (see ticket).
Diffstat (limited to 'docs/ref/forms/validation.txt')
| -rw-r--r-- | docs/ref/forms/validation.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt index 97883d7880..95424d0cd0 100644 --- a/docs/ref/forms/validation.txt +++ b/docs/ref/forms/validation.txt @@ -362,7 +362,9 @@ Secondly, once we have decided that the combined data in the two fields we are considering aren't valid, we must remember to remove them from the ``cleaned_data``. -In fact, Django will currently completely wipe out the ``cleaned_data`` -dictionary if there are any errors in the form. However, this behavior may -change in the future, so it's not a bad idea to clean up after yourself in the -first place. +.. versionchanged:: 1.5 + +Django used to remove the ``cleaned_data`` attribute entirely if there were +any errors in the form. Since version 1.5, ``cleaned_data`` is present even if +the form doesn't validate, but it contains only field values that did +validate. |
