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

Fix RadioField required attribute #615

Merged
merged 3 commits into from
Apr 27, 2021
Merged

Fix RadioField required attribute #615

merged 3 commits into from
Apr 27, 2021

Conversation

owgreen
Copy link
Contributor

@owgreen owgreen commented Jun 1, 2020

Fixes #477

Add required attribute for RadioFields.

@owgreen owgreen changed the title Fix RadioField required bug Fix RadioField required attribute bug Jun 1, 2020
@owgreen owgreen changed the title Fix RadioField required attribute bug Fix RadioField required attribute Jun 1, 2020
@azmeuk azmeuk added the bug Unexpected behavior label Oct 4, 2020
@azmeuk
Copy link
Member

azmeuk commented Oct 4, 2020

Thank you for your fix. Can you please test more cases:

  • Test that the form will validate if an required option is selected;
  • Test that the form won't validate elsewise;
  • Write similar tests for SelectField and MultipleSelectField as they share this __iter__ method.

@owgreen
Copy link
Contributor Author

owgreen commented Oct 6, 2020

Thank you for reviewing! I have added more test cases. Please take a look.

@azmeuk azmeuk merged commit 9d251e1 into wtforms:master Apr 27, 2021
@azmeuk
Copy link
Member

azmeuk commented Apr 27, 2021

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior
Development

Successfully merging this pull request may close these issues.

DataRequired and InputRequired do not add required attribute to RadioField objects
2 participants