﻿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
6156	Boolean field should force checking, but it is not.	sacrebis@…	nobody	"Documentation says:

----
 * Empty value: False
 * Validates that the check box is checked (i.e. the value is True) if the field has required=True

Note

Since all Field subclasses have required=True by default, the validation condition here is important. If you want to include a checkbox in your form that can be either checked or unchecked, you must remember to pass in required=False when creating the BooleanField.
----

But:
{{{
>>> from django.newforms import *
>>> class F(Form):
>>>    foo = BooleanField(required=True)

>>> f = F(data={}) # AFAIK if checkinput is not check then browser doesn't send anything in data
>>> f.is_valid() # should be False with errors that foo field is required 
True
>>> print f.cleaned_data['foo']
False
}}}

checked on version SVN r6670."		closed	Uncategorized	dev		duplicate			Unreviewed	0	0	0	0	0	0
