Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14144 closed (fixed)

ModelMultipleChoiceField doesnt check validators

Reported by: ys Owned by: matiasb
Component: Forms Version: dev
Severity: Keywords: ModelMultipleChoiceField, validators, clean
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

'clean' method is overloaded in ModelMultipleChoiceField but it doesnt call super().clean or run validators.

http://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L1000

So when i pass 'validators=[aaa]' in init aaa is not called.

Attachments (1)

14144.diff (1.6 KB ) - added by matiasb 14 years ago.
Patch and tests for ModelMultipleChoiceField clean method to run validators

Download all attachments as: .zip

Change History (5)

comment:1 by matiasb, 14 years ago

Owner: changed from nobody to matiasb

by matiasb, 14 years ago

Attachment: 14144.diff added

Patch and tests for ModelMultipleChoiceField clean method to run validators

comment:2 by matiasb, 14 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:3 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [14886]) Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.

comment:4 by Jannis Leidel, 14 years ago

(In [14906]) [1.2.X] Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.

Backport from trunk (r14886).

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