#28321: Errors on deleted forms shouldn't be included in a formset's errors
------------------------------------------+------------------------
Reporter: Peter Inglesby | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Django validates all forms in a formset, including those which have been
deleted by the user. This means that a formset's `.errors` attribute can
contain reports of errors that don't actually matter.
I'd argue that this violates the principle of least surprise, and that for
a deleted form with errors, an empty dict should be added to `._errors` in
a formset's `full_clean()`.
At the very least this is a documentation bug, since
https://docs.djangoproject.com/en/1.11/topics/forms/formsets/#custom-
formset-validation suggests not continuing with a call to `clean()` if a
formset has any errors.
--
Ticket URL: <https://code.djangoproject.com/ticket/28321>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.65de249c651b01a82824ef8b34e6b884%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.