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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user