1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for form/model fields.

This commit is contained in:
Loïc Bistuer
2016-04-22 07:18:43 +07:00
parent ec6121693f
commit a885bca1df
5 changed files with 39 additions and 6 deletions

View File

@@ -31,6 +31,8 @@ class ModelToValidate(models.Model):
)
url = models.URLField(blank=True)
f_with_custom_validator = models.IntegerField(blank=True, null=True, validators=[validate_answer_to_universe])
f_with_iterable_of_validators = models.IntegerField(blank=True, null=True,
validators=(validate_answer_to_universe,))
slug = models.SlugField(blank=True)
def clean(self):