From ab903fe304c347e669024ec482832df5f4fd869a Mon Sep 17 00:00:00 2001 From: Shrikrishna Singh Date: Fri, 3 Apr 2020 19:09:17 +0530 Subject: [PATCH] Mentioned non_field_errors in form validation docs. --- docs/ref/forms/validation.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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