mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +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
@@ -638,10 +638,7 @@ class URLField(CharField):
|
||||
default_error_messages = {
|
||||
'invalid': _('Enter a valid URL.'),
|
||||
}
|
||||
|
||||
def __init__(self, max_length=None, min_length=None, *args, **kwargs):
|
||||
super(URLField, self).__init__(max_length, min_length, *args, **kwargs)
|
||||
self.validators.append(validators.URLValidator())
|
||||
default_validators = [validators.URLValidator()]
|
||||
|
||||
def to_python(self, value):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user