Ticket #5192: 5192a.diff
File 5192a.diff, 1007 bytes (added by , 17 years ago) |
---|
-
django/core/validators.py
23 23 _datere = r'\d{4}-\d{1,2}-\d{1,2}' 24 24 _timere = r'(?:[01]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?' 25 25 alnum_re = re.compile(r'^\w+$') 26 alnumurl_re = re.compile(r'^[-\w/ ]+$')26 alnumurl_re = re.compile(r'^[-\w/~]+$') 27 27 ansi_date_re = re.compile('^%s$' % _datere) 28 28 ansi_time_re = re.compile('^%s$' % _timere) 29 29 ansi_datetime_re = re.compile('^%s %s$' % (_datere, _timere)) … … 73 73 74 74 def isAlphaNumericURL(field_data, all_data): 75 75 if not alnumurl_re.search(field_data): 76 raise ValidationError, _("This value must contain only letters, numbers, underscores, dashes or slashes.")76 raise ValidationError, _("This value must contain only letters, numbers, underscores, dashes, the tilde, or slashes.") 77 77 78 78 def isSlug(field_data, all_data): 79 79 if not slug_re.search(field_data):