floere / phony

E164 international phone number normalizing, splitting, formatting.
http://florianhanke.com/phony/
MIT License
1.01k stars 226 forks source link

Phony.plausible? returns false for a valid Belgian phone number #476

Closed AnnaKai closed 3 years ago

AnnaKai commented 3 years ago

What I did

Attempted to save a valid phone number Checked I was on the gem's latest version Read this similar issue.

What happened

Failed to save a Belgian phone number with area code 63 / 063

Phony.plausible?('+32 63 949 08 17', country_code: 'BE')
Phony.plausible?('+32 063 949 08 17', country_code: 'BE')
Phony.plausible?('63 949 08 17', country_code: 'BE')
Phony.plausible?('639490817', country_code: 'BE')
Phony.plausible?('+32639490817', country_code: 'BE')
Phony.plausible?('32639490817', country_code: 'BE') 
=> false

What I expected to happen and why

According to wiki, 63 is a valid area code in Belgium and according to http://www.wtng.info/wtng-32-be.html subscriber number can be 7 digits. So, I expected Phony.plausible? to return true

AnnaKai commented 3 years ago

Sorry, it was client's mistake

floere commented 3 years ago

@AnnaKai No problem! 😊