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

DataRequired fails for TimeField() with 00:00:00 #82

Closed
ThiefMaster opened this issue May 14, 2014 · 1 comment
Closed

DataRequired fails for TimeField() with 00:00:00 #82

ThiefMaster opened this issue May 14, 2014 · 1 comment
Labels
wontfix This won't happen

Comments

@ThiefMaster
Copy link

In Python time() (i.e. 00:00:00) evaluates to False which makes the DataRequired validator fail. However, midnight is a very valid time.

@crast
Copy link
Contributor

crast commented May 14, 2014

Read the docs for DataRequired. It does not accept falsey values, and as a result we've moved away from using it (but it's still there for compatibility with older code, and will remain for a while.)

For almost all use cases, InputRequired is what you want.

@crast crast closed this as completed May 14, 2014
crast pushed a commit that referenced this issue May 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This won't happen
Development

No branches or pull requests

2 participants