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

Add a BooleanRequired validator for use with BooleanField #481

Closed
wants to merge 3 commits into from

Conversation

alswl
Copy link

@alswl alswl commented May 5, 2019

@alswl alswl closed this May 5, 2019
@alswl
Copy link
Author

alswl commented May 5, 2019

WIP

@alswl alswl reopened this May 5, 2019
@ftm ftm changed the title feat: provide BooleanRequired for BooleanField Add a BooleanRequired validator for use with BooleanField May 5, 2019
@ftm
Copy link
Contributor

ftm commented May 5, 2019

Can you explain the purpose of this because at the moment I'm struggling to see one.

The article you link says that BooleanField does not accept False as a false value, when it does and has done since January 2018 (one month before the article was released) although admittedly it looks like the docs were not updated when that change was made (Edit: I have since updated the docs, #485).

From what I can see your validator then attempts to fix this non-issue by ensuring the raw data can only be True or False which defeats the whole point of accepting a range of false values (i.e. not just True or False).

Additionally you have not written any tests for the validator.

@ftm
Copy link
Contributor

ftm commented Jun 15, 2019

As there has been no response, I am closing this.

@ftm ftm closed this Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants