daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.04k stars 130 forks source link

Nigeria’s National Numbering Plan has been changed from 1 Jan 2024 #294

Closed falshunov closed 5 months ago

falshunov commented 5 months ago

Hello, as announced on the website of the Nigerian Communications Commission, the National Numbering Plan has changed since January 1, 2024. Now, when calling from outside Nigeria, you should dial 20 after the country code 234.

For example: Old | New 234 1 XXX XXXX | 234 201 XXX XXXX

You can find more details on the official page: https://ncc.gov.ng/media-centre/public-notices/1428-itu-notification-of-change-in-national-numbering-plan

Current situation: Google libphonenumber: +2342012270000 - valid? True +23412270000 - valid? True

Phonelib: +2342012270000 - valid? False +23412270000 - valid? True

I believe we need to update the library to support both variations of numbers (for legacy compatibility) as it currently operates with Google's libphonenumber.

daddyz commented 5 months ago

@falshunov fixed in v0.8.7

falshunov commented 5 months ago

@daddyz Thank you so much for your prompt action! I've checked and now that works fine.