forms.MultipleChoiceField

class MultipleChoiceField(**kwargs) [source]

  • Default widget: SelectMultiple
  • Empty value: [] (an empty list)
  • Normalizes to: A list of Unicode objects.
  • Validates that every value in the given list of values exists in the list of choices.
  • Error message keys: required, invalid_choice, invalid_list

The invalid_choice error message may contain %(value)s, which will be replaced with the selected choice.

Takes one extra required argument, choices, as for ChoiceField.

doc_Django
2016-10-09 18:37:01
Comments
Leave a Comment

Please login to continue.