#29036: HTML5 required validation does not work for SelectDateWidget
--------------------------------+--------------------------------------
Reporter: Vlastimil Zíma | Owner: nobody
Type: Bug | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Comment (by Vlastimil Zíma):
Hi Israel,
we have a slightly more complicated use case, in which `required`
attribute is added by JavaScript depending on other values in the form.
Having 0 as a default value, makes things more complicated for us.
More cases might emerge based on browsers' behavior, which considers 0 as
selected.
Also looking around for HTML5 specification, it looks like hiding the
empty label for required select is not valid. According to
https://www.w3.org/TR/html5/sec-forms.html#placeholder-label-option the
empty labels must be present for `select`s with `required` attributes.
Based on Tims' closure, should I open a new ticket for that?
--
Ticket URL: <https://code.djangoproject.com/ticket/29036#comment:4>
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/063.35afacba0999fdbb937d6550e2a6ec1d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.