﻿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
12160	BooleanField clean method fails for false values	spatovich@…	nobody	"When a BooleanField is defined as required, calling clean on False values causes ValidationError.
{{{
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type ""help"", ""copyright"", ""credits"" or ""license"" for more information.
(InteractiveConsole)
>>> from django.forms.fields import *
>>> f = BooleanField()
>>> f
<django.forms.fields.BooleanField object at 0x01EB8A50>
>>> f.clean('0')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""C:\Python25\lib\site-packages\django\forms\fields.py"", line 597, in clean
    raise ValidationError(self.error_messages['required'])
ValidationError: [u'This field is required.']
>>> f.clean(False)
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""C:\Python25\lib\site-packages\django\forms\fields.py"", line 597, in clean
    raise ValidationError(self.error_messages['required'])
ValidationError: [u'This field is required.']
>>> f.clean(True)
True
>>> f.clean('1')
True
>>>
}}}
"		closed	Forms	1.0		invalid	BooleanField		Unreviewed	0	0	0	0	0	0
