0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Mentioned non_field_errors in form validation docs.

This commit is contained in:
Shrikrishna Singh 2020-04-03 19:09:17 +05:30 committed by Mariusz Felisiak
parent ed274a4ae4
commit ab903fe304

View File

@ -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