Opened 8 years ago

Closed 8 years ago

#5737 closed (invalid)

CheckboxSelectMultiple when you use choices, required=False is not respected

Reported by: DavidReynolds Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: david@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

if for example you do:

TOWN_CHOICES = (
    ('Norwich', 'Norwich'),
    ('Dereham','Dereham'),
)

town = forms.MultipleChoiceField(required=False, choices=TOWN_CHOICES, widget=forms.CheckboxSelectMultiple)

You cannot submit your form without selecting one of the choices, the form throws the following error:

Select a valid choice. That choice is not one of the available choices.

Change History (4)

comment:1 Changed 8 years ago by DavidReynolds

  • Cc david@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 8 years ago by gwilson

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 8 years ago by DavidReynolds

Can anyone else confirm this behaviour, as I now can't recreate it!

comment:4 Changed 8 years ago by DavidReynolds

  • Resolution set to invalid
  • Status changed from new to closed

I'm closing this because I believe I misreported it.

Sorry.

Note: See TracTickets for help on using tickets.
Back to Top