Jump to >

djblets.util.compat.django.core.validators

Compatibility fallbacks for django.core.validators.

class URLValidator(schemes=None, **kwargs)[source]

Bases: django.core.validators.RegexValidator

ul = '\\u00a1-\\uffff'[source]
ipv4_re = '(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}'[source]
ipv6_re = '\\[[0-9a-f:\\.]+\\]'[source]
hostname_re = '[a-z\\u00a1-\\uffff0-9](?:[a-z\\u00a1-\\uffff0-9-]{0,61}[a-z\\u00a1-\\uffff0-9])?'[source]
domain_re = '(?:\\.(?!-)[a-z\\u00a1-\\uffff0-9-]{1,63}(?<!-))*'[source]
tld_re = '\\.(?!-)(?:[a-z\\u00a1-\\uffff-]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\\.?'[source]
host_re = '([a-z\\u00a1-\\uffff0-9](?:[a-z\\u00a1-\\uffff0-9-]{0,61}[a-z\\u00a1-\\uffff0-9])?(?:\\.(?!-)[a-z\\u00a1-\\uffff0-9-]{1,63}(?<!-))*\\.(?!-)(?:[a-z\\u00a1-\\uffff-]{2,63}|xn--[a-z0-9]{1,59})(?<!-)\\.?|localhost)'[source]
regex = <_sre.SRE_Pattern object>[source]
message = _(u'Enter a valid URL.')[source]
__init__(schemes=None, **kwargs)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

schemes = ['http', 'https', 'ftp', 'ftps'][source]
__call__(value)[source]