#8898: `required` validation bypassed when using `DateTimeField` with
`SplitDateTimeWidget`.
---------------------------------------------+------------------------------
Reporter: mrmachine | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: SVN
Resolution: | Keywords: DateTimeField
SplitDateTimeWidget
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by anonymous):
This bug has wider implications - if you have a form field with a
MultiWidget, and you set it to required = False, then if you don't input
anything in the widgets - it will tell you that you must input a value.
The code which is flawed is this, inside clean() of a Field:
if value in EMPTY_VALUES:
return None
if you have 2 widgets then value == ['', ''] for an empty input, and the
above doesn't work.
I will circumvent this in my code, but it'd be nice if it got corrected :)
--
Ticket URL: <http://code.djangoproject.com/ticket/8898#comment:16>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---