Fixed #15640 -- Added new initial digit in Spain phone numbers to localflavor's ESPhoneNumberField form field. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
13b4f98b80
commit
c78d861c24
|
@ -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):
|
||||
|
|
|
@ -108,10 +108,11 @@ class ESLocalFlavorTests(LocalFlavorTestCase):
|
|||
'650010101': '650010101',
|
||||
'931234567': '931234567',
|
||||
'800123123': '800123123',
|
||||
'789789789': '789789789',
|
||||
}
|
||||
invalid = {
|
||||
'555555555': error_invalid,
|
||||
'789789789': error_invalid,
|
||||
'489489489': error_invalid,
|
||||
'99123123': error_invalid,
|
||||
'9999123123': error_invalid,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue