CountryCodePickerProject icon indicating copy to clipboard operation
CountryCodePickerProject copied to clipboard

autoformat number and phone number validation not working with certain numbers

Open CodeIsmail opened this issue 6 years ago • 3 comments

Hi. I've two cases with phone numbers from two different countries

  1. A Benin Republic mtn phone number starting with +229 51 is considered an invalid phone number and not properly formatted Screenshot_20200716-100030_RightQ Kiosk

  2. A Nigerian Phone starting with +234 70 becomes valid with incomplete phone number digits(7). eg +234 703 240 is incomplete but considered as valid instead of +234 703 240 0000 Screenshot_20200716-095817_RightQ Kiosk

CodeIsmail avatar Jul 16 '20 12:07 CodeIsmail

CCP simply uses libphonenumber for validation. I checked on some other website to check validity and they match the CCP result:

image

image

image

image

Probably this is because I am testing after updating the libphonenumber to the latest. I'll be releasing a new version of CCP that should solve the issue.

hbb20 avatar Jul 18 '20 06:07 hbb20

Please try v2.4.1. If you still face this issue, then feel free to comment back.

hbb20 avatar Jul 18 '20 07:07 hbb20

Case 1 is working fine now after changing the version. For case 2, valid numbers are usually 13 digits with country code. Eg This is valid. +234 818 348 2344. +234 703 682 2335.

This shouldn't be valid +234 703 682 2 (7 digits)

CodeIsmail avatar Jul 18 '20 09:07 CodeIsmail