mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #20594 -- Add validation to models.SlugField.
Thanks carbonXT for the report.
This commit is contained in:
committed by
Tim Graham
parent
675558d00e
commit
dc9c359546
@@ -19,6 +19,7 @@ class ModelToValidate(models.Model):
|
||||
email = models.EmailField(blank=True)
|
||||
url = models.URLField(blank=True)
|
||||
f_with_custom_validator = models.IntegerField(blank=True, null=True, validators=[validate_answer_to_universe])
|
||||
slug = models.SlugField(blank=True)
|
||||
|
||||
def clean(self):
|
||||
super(ModelToValidate, self).clean()
|
||||
|
||||
Reference in New Issue
Block a user