diff options
| author | Loic Bistuer <loic.bistuer@sixmedia.com> | 2014-02-14 01:19:13 +0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-02-14 06:52:50 -0500 |
| commit | 2e4200b5c7cb4887b7034bb5dcbbd354e4698f27 (patch) | |
| tree | 09f13f98a06c7463cf92357cc74268c8ebbd10d7 /docs/ref/forms/validation.txt | |
| parent | 007c5cd36762c125102d4f6c48d7e7f42dbfdcff (diff) | |
Fixed #21654 -- Documented a use-case for Form.errors.as_data().
Thanks selwin for the suggestion.
Diffstat (limited to 'docs/ref/forms/validation.txt')
| -rw-r--r-- | docs/ref/forms/validation.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt index 569e7e77e7..78a022d436 100644 --- a/docs/ref/forms/validation.txt +++ b/docs/ref/forms/validation.txt @@ -179,6 +179,13 @@ to override your error message you can still opt for the less verbose:: ValidationError(_('Invalid value: %s') % value) +.. versionadded:: 1.7 + +The :meth:`Form.errors.as_data() <django.forms.Form.errors.as_data()>` and +:meth:`Form.errors.as_json() <django.forms.Form.errors.as_json()>` methods +greatly benefit from fully featured ``ValidationError``\s (with a ``code`` name +and a ``params`` dictionary). + Raising multiple errors ~~~~~~~~~~~~~~~~~~~~~~~ |
