

def clean_choices(self):
    choices = self.cleaned_data['choices']
    if (not self.poll.is_multiple_choice):
        return choices
    if (len(choices) > self.poll.choice_max):
        raise forms.ValidationError((_('Too many selected choices. Limit is %s') % self.poll.choice_max))
    if (len(choices) < self.poll.choice_min):
        raise forms.ValidationError((_('Too few selected choices. Minimum is %s') % self.poll.choice_min))
    return choices

dataset/ETHPy150Open nitely/Spirit/spirit/comment/poll/forms.py PollVoteManyForm.clean_choices/original