Fixed #2577 -- Made isSlug() validator translation-aware. Thanks for the patch, henrik_kroeger@arcor.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ff5e01db5d
commit
cccbe23006
|
@ -68,7 +68,7 @@ def isAlphaNumericURL(field_data, all_data):
|
||||||
|
|
||||||
def isSlug(field_data, all_data):
|
def isSlug(field_data, all_data):
|
||||||
if not slug_re.search(field_data):
|
if not slug_re.search(field_data):
|
||||||
raise ValidationError, "This value must contain only letters, numbers, underscores or hyphens."
|
raise ValidationError, gettext("This value must contain only letters, numbers, underscores or hyphens.")
|
||||||
|
|
||||||
def isLowerCase(field_data, all_data):
|
def isLowerCase(field_data, all_data):
|
||||||
if field_data.lower() != field_data:
|
if field_data.lower() != field_data:
|
||||||
|
|
Loading…
Reference in New Issue