Skip to content

Commit

Permalink
Fix some invalid French phone numbers starting with "+33 8x" (#933)
Browse files Browse the repository at this point in the history
The full range of phone number starting with 08 isn't valid (eg. 083xx is not valid) so this patch limits the range to valid numbers only.

French validator used by the phonenumbers project:
https://github.com/daviddrysdale/python-phonenumbers/blob/dev/python/phonenumbers/data/region_FR.py#L9
  • Loading branch information
stephane authored and fcurella committed Mar 26, 2019
1 parent d02af19 commit 4cc1185
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions faker/providers/phone_number/fr_FR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ class Provider(PhoneNumberProvider):
'+33 (0)4 ## ## ## ##',
'+33 (0)5 ## ## ## ##',
'+33 (0)6 ## ## ## ##',
'+33 (0)8 ## ## ## ##',
'+33 (0)8 0# ## ## ##',
'+33 1 ## ## ## ##',
'+33 1 ## ## ## ##',
'+33 2 ## ## ## ##',
'+33 3 ## ## ## ##',
'+33 4 ## ## ## ##',
'+33 5 ## ## ## ##',
'+33 6 ## ## ## ##',
'+33 8 ## ## ## ##',
'+33 8 0# ## ## ##',
'01########',
'01########',
'02########',
'03########',
'04########',
'05########',
'06########',
'08########',
'080#######',
'01 ## ## ## ##',
'01 ## ## ## ##',
'02 ## ## ## ##',
'03 ## ## ## ##',
'04 ## ## ## ##',
'05 ## ## ## ##',
'06 ## ## ## ##',
'08 ## ## ## ##',
'08 0# ## ## ##',
)

0 comments on commit 4cc1185

Please sign in to comment.