AfterShip / phone

With a given country and phone number, validate and reformat the mobile phone number to the E.164 standard. The purpose of this is to allow us to send SMS to mobile phones only.
https://www.aftership.com
MIT License
846 stars 268 forks source link

German phone numbers not recognized as valid #296

Closed ZackUTD closed 2 years ago

ZackUTD commented 2 years ago

Hello,

I have noticed that phone is always reacting to German (DE, +49) phone numbers as being invalid. This appears to affect both mobile phone numbers as well as landline numbers.

I tried with and without country code and got the same result: phone('+495115442380') phone('+495115442380', {country: 'DE'})

Any assistance is appreciated!

Bossa573 commented 2 years ago
image

511 is not a valid German mobile phone number prefix please provide docs if you think it's outdated. Can also check this section https://github.com/AfterShip/phone#skipping-phone-number-initial-digit-checking

ZackUTD commented 2 years ago

Hello Bossa,

Thank you for the quick reply! That makes total sense, I don't believe any of the numbers in question were mobile numbers.

Thanks!