On Sun, Oct 5, 2008 at 11:07 AM, globophobe <[EMAIL PROTECTED]> wrote:
> I encountered this when I upgraded from my recent copy of 0.97 django
> to 1.0-final. Why does MyForm not validate when instantiated as m =
> MyForm({'bfield':'False'})?

Because the field doesn't have "required=False"; all form fields are
required by default unless you say otherwise. A BooleanField
translates into a checkbox, and the only way to "require" a value for
a checkbox is to require it to be checked (i.e., to have a value which
evaluates true); any false value, or the absence of a value, will
fail.

This has been the documented behavior for a long time, though
occasional bugs would cause it not to actually work that way.

(also, there have been several long discussions about this behavior
leading up to it being finalized as it currently works, so if you'd
like to take up an argument against it you probably want to start by
finding them in the archive)


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to