diff options
| author | Shrikrishna Singh <krishnasingh.ss30@gmail.com> | 2020-04-03 19:09:17 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-09 12:37:36 +0200 |
| commit | ab903fe304c347e669024ec482832df5f4fd869a (patch) | |
| tree | a56ac6139ad008dc145ec652a5412193cce54f2f /docs | |
| parent | ed274a4ae4665b5c7a367670b0c89c8eeed1c8b4 (diff) | |
Mentioned non_field_errors in form validation docs.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/forms/validation.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/forms/validation.txt b/docs/ref/forms/validation.txt index 188ccca736..d12232afc7 100644 --- a/docs/ref/forms/validation.txt +++ b/docs/ref/forms/validation.txt @@ -365,7 +365,9 @@ example:: ) In this code, if the validation error is raised, the form will display an -error message at the top of the form (normally) describing the problem. +error message at the top of the form (normally) describing the problem. Such +errors are non-field errors, which are displayed in the template with +``{{ form.non_field_errors }}``. The call to ``super().clean()`` in the example code ensures that any validation logic in parent classes is maintained. If your form inherits another that |
