fixed URLField.validate() wasn't using BaseField.error() to raise a ValidationError

This commit is contained in:
Nicolas Perriault 2011-10-25 10:53:58 +02:00
parent 62480fe940
commit 7db5335420

View File

@ -100,8 +100,7 @@ class URLField(StringField):
def validate(self, value):
if not URLField.URL_REGEX.match(value):
raise ValidationError('Invalid URL: %s ("%s")' % (value,
self.name))
self.error('Invalid URL: %s' % value)
if self.verify_exists:
import urllib2