#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 Aymeric Augustin):
`short_circuit_validation` seems a bit narrow. It covers the specific use
case where you can write a sequence of validator that should pass exactly
in order, and if one fails, it isn't worth checking the next ones. I'm not
convinced that will be sufficient in general "in case of bigger amount of
validators and more complex checks".
I think writing a validator that wraps other validators and delegates to
the appropriate ones, according to your business logic, is the most
flexible approach. It doesn't require changes in Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/27263#comment:9>
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.e5b8384a870d65a0585ac5e4bfd6cb33%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.