mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user