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

Phony.plausible? returns true for non-plausible German number #526

Open
ademdinarevic opened this issue Sep 27, 2024 · 1 comment
Open

Comments

@ademdinarevic
Copy link

Important fact: Phony only works with international phone numbers. It needs the country code to be able to identify the number's country and rules.

What I did

For any number other than German, when adding two country codes to the number, the Phony.plausible? check returns true
*

What happened

For number `"+49+491505632832", Phony.plausible? returns true
*

What I expected to happen and why

I would expect to return false, like it does for other country codes
*

@floere
Copy link
Owner

floere commented Oct 15, 2024

@ademdinarevic Hi! Thanks for the issue – would you want to try improving this and open a PR? I think it succeeds/fails because of the length. It should probably check if the number is in a general good state and perhaps raise in a case like this, so the user of the gem can fix their code.

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

No branches or pull requests

2 participants