fixed URLField.validate() wasn't using BaseField.error() to raise a ValidationError
This commit is contained in:
parent
62480fe940
commit
7db5335420
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue