--- a/formencode/validators.py +++ b/formencode/validators.py @@ -1448,9 +1448,9 @@ ^(http|https):// (?:[%:\w]*@)? # authenticator (?: # ip or domain - (?P(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))| + (?P(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:\[[0-9a-fA-F:]+\]))| (?P[a-z0-9][a-z0-9\-]{,62}\.)* # subdomain - (?P[a-z]{2,63}|xn--[a-z0-9\-]{2,59}) # top level domain + (?P[a-z]{2,63}|xn--[a-z0-9\-]{2,59}|[a-z0-9]{1,63}|[a-z0-9][a-z0-9\-]{,61}[a-z0-9]) # top level domain ) (?::[0-9]{1,5})? # port # files/delims/etc