fixed URLField.validate() wasn't using BaseField.error() to raise a ValidationError
This commit is contained in:
parent
62480fe940
commit
7db5335420
@ -100,8 +100,7 @@ class URLField(StringField):
|
|||||||
|
|
||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
if not URLField.URL_REGEX.match(value):
|
if not URLField.URL_REGEX.match(value):
|
||||||
raise ValidationError('Invalid URL: %s ("%s")' % (value,
|
self.error('Invalid URL: %s' % value)
|
||||||
self.name))
|
|
||||||
|
|
||||||
if self.verify_exists:
|
if self.verify_exists:
|
||||||
import urllib2
|
import urllib2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user