Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #15640 -- Added new initial digit in Spain phone numbers to loc…

…alflavor's ESPhoneNumberField form field. Thanks, Claude Paroz.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c78d861c244c953023ad8a128a0749d077b4e356 1 parent 13b4f98
@jezdez jezdez authored
View
2  django/contrib/localflavor/es/forms.py
@@ -41,7 +41,7 @@ class ESPhoneNumberField(RegexField):
}
def __init__(self, *args, **kwargs):
- super(ESPhoneNumberField, self).__init__(r'^(6|8|9)\d{8}$',
+ super(ESPhoneNumberField, self).__init__(r'^(6|7|8|9)\d{8}$',
max_length=None, min_length=None, *args, **kwargs)
class ESIdentityCardNumberField(RegexField):
View
3  tests/regressiontests/forms/localflavor/es.py
@@ -108,10 +108,11 @@ def test_ESPhoneNumberField(self):
'650010101': '650010101',
'931234567': '931234567',
'800123123': '800123123',
+ '789789789': '789789789',
}
invalid = {
'555555555': error_invalid,
- '789789789': error_invalid,
+ '489489489': error_invalid,
'99123123': error_invalid,
'9999123123': error_invalid,
}
Please sign in to comment.
Something went wrong with that request. Please try again.