phony icon indicating copy to clipboard operation
phony copied to clipboard

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

Open ademdinarevic opened this issue 1 year ago • 1 comments

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 *

ademdinarevic avatar Sep 27 '24 13:09 ademdinarevic

@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.

floere avatar Oct 15 '24 07:10 floere

@ademdinarevic This has been fixed in 2.21.0.

floere avatar Jan 03 '25 11:01 floere