diff options
| author | Jannis Leidel <jannis@leidel.info> | 2010-12-13 13:56:55 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2010-12-13 13:56:55 +0000 |
| commit | 32bf35da09660604e8c65c1ac75f28b1918cf91c (patch) | |
| tree | 8963999baa6c113f027506bdbff9770e75d07b9f /django/forms/models.py | |
| parent | 69edfc7531f99427e9c3544a262c7f73611ea930 (diff) | |
[1.2.X] Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.
Backport from trunk (r14886).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/models.py')
| -rw-r--r-- | django/forms/models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py index 6ba2bed472..9180ac17b8 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -1035,6 +1035,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): |
