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

Does not correctly parse Zimbabwe numbers +263 #350

Closed
rayteale opened this issue Mar 30, 2023 · 8 comments
Closed

Does not correctly parse Zimbabwe numbers +263 #350

rayteale opened this issue Mar 30, 2023 · 8 comments

Comments

@rayteale
Copy link

Version 3.1.31

Does not seem to recognise valid Zimbabwe numbers.

  1. Cresta Hotel in Harare
    +263 24 2772633 : {
    isValid: false,
    phoneNumber: null,
    countryIso2: null,
    countryIso3: null,
    countryCode: null
    }

  2. By contrast Mojo Hotel in Cape Town
    +27 87 940 7474 : {
    isValid: true,
    phoneNumber: '+27879407474',
    countryIso2: 'ZA',
    countryIso3: 'ZAF',
    countryCode: '+27'
    }

@Bossa573
Copy link
Member

note that the library cannot detect landline phone numbers properly.
https://github.com/AfterShip/phone#faq
thank you very much

@rayteale
Copy link
Author

Not just landline numbers. Also fails with eSim mobile numbers. i havent tested with other Zim mobiles.

@Bossa573
Copy link
Member

Can you provide the precise correct format (and the prove showing those are the correct mobile phone number format)?

@Bossa573
Copy link
Member

Format refering to
https://github.com/AfterShip/phone/blob/master/src/data/country_phone_data.ts#L1896

mainly about phone number prefix and the phone number length

@rayteale
Copy link
Author

rayteale commented Mar 30, 2023

My customer complained with a number [+263 78 589 xxxx]. Apparently this is an eSim number in Zimbabwe. My application is for mobiles only. Perhaps they have recently added 78 to mobile area codes. Unfortunately I am not in that country so cant test at all. (I can confirm that it works with other mobiles).

@rayteale
Copy link
Author

Apparently 78 is valid mobile for Zimbabwe - according to Wikipedia. Econet Wireless Zimbabwe. See "How to call a Zimbabwe mobile phone number" on this page https://en.wikipedia.org/wiki/Telephone_numbers_in_Zimbabwe

@Bossa573
Copy link
Member

I'll add 78 to it in the next release

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