#23547: BooleanField that is required and have value False always will raise
ValidationError
-----------------------------------+--------------------------------------
     Reporter:  Lagovas            |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Forms              |                  Version:  1.6
     Severity:  Normal             |               Resolution:
     Keywords:  Form BooleanField  |             Triage Stage:  Unreviewed
    Has patch:  1                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------

Comment (by timgraham):

 Your proposed change is backwards incompatible. You can't just call the
 existing behavior a bug and remove tests that don't conform to how you
 expect things to work.

 [https://docs.djangoproject.com/en/dev/ref/forms/fields/#booleanfield As
 documented]: "Since all `Field` subclasses have `required=True` by
 default, the validation condition here is important. If you want to
 include a boolean in your form that can be either `True` or `False` (e.g.
 a checked or unchecked checkbox), you must remember to pass in
 `required=False` when creating the `BooleanField`."

--
Ticket URL: <https://code.djangoproject.com/ticket/23547#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.f32e2cfe80ccbcf54fba1d0426e9f493%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to