Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated phone numbers are invalid #2757

Closed
kalsan opened this issue May 2, 2023 · 4 comments
Closed

Generated phone numbers are invalid #2757

kalsan opened this issue May 2, 2023 · 4 comments
Assignees

Comments

@kalsan
Copy link

kalsan commented May 2, 2023

Describe the bug

Faker::PhoneNumber.cell_phone_in_e164 generates phone numbers that are invalid according to Phonelib / https://github.com/daddyz/phonelib

To Reproduce

a = Faker::PhoneNumber.cell_phone_in_e164; puts(a); puts Phonelib.valid?(a)

Run in different locales and loop until second output is false. Example:

+4915302892971
false

The locale used to produce this was de. The phone number is one digit too long for a number from Germany.

@gkunwar
Copy link
Contributor

gkunwar commented May 3, 2023

Anyone started to work in this issue?

@thdaraujo
Copy link
Contributor

hopefully it's just a matter of updating the format:

formats: ['01#### #####', '01### ######', '01#1 ### ####', '011# ### ####', '02# #### ####', '03## ### ####', '055 #### ####', '056 #### ####', '0800 ### ####', '08## ### ####', '09## ### ####', '016977 ####', '01### #####', '0500 ######', '0800 ######']

@gkunwar if you want to take a look at this issue, feel free to do it. Thanks!

@gkunwar
Copy link
Contributor

gkunwar commented May 4, 2023

Thanks @thdaraujo , I will look into it.

@stefannibrasil
Copy link
Contributor

Thanks for reporting this bug! To help with bug triage, I will mark this one as duplicate of #2047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants