Ollie Rutherfurd committed 70e2e0f

HTTPURLValidator no longer treats values that don't start with http as valid

Comments (0)

Files changed (2)


     def validate(self, element, state):
         url = element.value
-        if url is None or not url.startswith('http'):
+        if url is None:
             return True
         parsed = self.urlparse.urlparse(url)


     not v.validate(el, None)
     eq_(el.errors, ['X'])
+    el = scalar('')
+    not v.validate(el, None)
+    eq_(el.errors, ['test is not a valid URL.'])
 def test_url_canonicalizer_default():
     v = URLCanonicalizer()