summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-12-12 22:57:37 +0000
committerJannis Leidel <jannis@leidel.info>2010-12-12 22:57:37 +0000
commit34daa0804c768a6cdeb31d123833b66b5ad89f3c (patch)
tree5480aefac797ca187f029061220a8aa2ee473e81 /django/forms
parentdad28e8557203c8c104354cbac0349bfba5cba77 (diff)
Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 4ffc3b6fac..de52b6a7e0 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1045,6 +1045,9 @@ class ModelMultipleChoiceField(ModelChoiceField):
for val in value:
if force_unicode(val) not in pks:
raise ValidationError(self.error_messages['invalid_choice'] % val)
+ # Since this overrides the inherited ModelChoiceField.clean
+ # we run custom validators here
+ self.run_validators(value)
return qs
def prepare_value(self, value):