Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget. #11323

Merged
merged 1 commit into from May 8, 2019

Conversation

hramezani
Copy link
Member

django/forms/widgets.py Outdated Show resolved Hide resolved
<option value="11">November</option>
<option value="12">December</option>
</select>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove the blank lines as the helpers for checking HTML should ignore whitespace between tags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, It doesn't. I added a test to cover the required=False case.

@hramezani hramezani force-pushed the ticket_29056 branch 2 times, most recently from b86f77c to a608565 Compare May 5, 2019 11:33
@hramezani
Copy link
Member Author

@pope1ni Requested changes are Done

@felixxm felixxm self-assigned this May 8, 2019
@felixxm felixxm changed the title Fixed #29056 -- Add placeholder attr to required SelectDateWidget rendered HTML. Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget. May 8, 2019
@felixxm
Copy link
Member

felixxm commented May 8, 2019

@hramezani Thanks for this patch 👍 I simplified tests and added release notes.

placeholder is required for "select" with "required" attribute.
@hramezani
Copy link
Member Author

@felixxm Thanks!

@felixxm felixxm merged commit f038214 into django:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants