#27263: Allow validators to short-circuit in form field validation
---------------------------------+-----------------------------------------
Reporter: Alexey Rogachev | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: form, validator | Triage Stage: Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Comment (by Alexey Rogachev):
Another option can be customizing each validator to not execute in case of
existing errors.
Usually we need either to apply all validators or just first one, so
probably this is not needed. But it can be implemented by adding
additional argument to validator class and adding check with `getattr` for
example in case it not exist. But validator can be also defined as simple
function, so it brings additional complexity.
--
Ticket URL: <https://code.djangoproject.com/ticket/27263#comment:8>
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/067.2041b27e6209219e744437dbc0fd6f9d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.