Ticket #2276: validators.py.diff
File validators.py.diff, 603 bytes (added by , 18 years ago) |
---|
-
django/core/validators.py
27 27 integer_re = re.compile(r'^-?\d+$') 28 28 ip4_re = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$') 29 29 phone_re = re.compile(r'^[A-PR-Y0-9]{3}-[A-PR-Y0-9]{3}-[A-PR-Y0-9]{4}$', re.IGNORECASE) 30 slug_re = re.compile(r'^[-\w]+$' )30 slug_re = re.compile(r'^[-\w]+$', re.UNICODE) 31 31 url_re = re.compile(r'^https?://\S+$') 32 32 33 33 lazy_inter = lazy(lambda a,b: str(a) % b, str)