﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33874	BooleanField validate function should use ‘value is not None’ instead of 'not value'	winng	nobody	"https://github.com/django/django/blob/a5eba20f40a78a0d6236908502e450905afabbd7/django/forms/fields.py#L730

When booleanfield is False, it will meet the condition `not value and self.required` and raise `ValidationError(self.error_messages['required'], code='required')`


{{{
>>> from django import forms
>>> f = forms.BooleanField()
>>> f.clean(""False"") 
Traceback (most recent call last):
  File ""<stdin>"", line 1, in <module>
  File ""D:\projects\library_manager\venv\lib\site-packages\django\forms\fields.py"", line 150, in clean
    self.validate(value)
  File ""D:\projects\library_manager\venv\lib\site-packages\django\forms\fields.py"", line 720, in validate
    raise ValidationError(self.error_messages['required'], code='required')
django.core.exceptions.ValidationError: <exception str() failed>
>>> f.clean("""")      
Traceback (most recent call last):
  File ""<stdin>"", line 1, in <module>
  File ""D:\projects\library_manager\venv\lib\site-packages\django\forms\fields.py"", line 150, in clean
    self.validate(value)
  File ""D:\projects\library_manager\venv\lib\site-packages\django\forms\fields.py"", line 720, in validate
    raise ValidationError(self.error_messages['required'], code='required')
django.core.exceptions.ValidationError: <exception str() failed>
>>> f.clean(""True"") 
True
}}}
"	Bug	closed	Forms	3.2	Normal	invalid	form BooleanField validate	houtianhong502@…	Unreviewed	0	0	0	0	0	0
