libPhoneNumber-iOS icon indicating copy to clipboard operation
libPhoneNumber-iOS copied to clipboard

phonenumber invalid

Open xsgoing opened this issue 5 years ago • 6 comments

this is my phone number, but return isvalid is false, libPhoneNumber-iOS (0.9.15) 84-862926295

xsgoing avatar Oct 30 '20 07:10 xsgoing

I have the same problems. My code worked previously and is no longer working after I got the latest version.

let parsedNumberRaw = try? NBPhoneNumberUtil.init().parse(phoneNumber, defaultRegion: code.countryRegion)
 guard let parsedNumber = parsedNumberRaw, NBPhoneNumberUtil.init().isValidNumber(parsedNumber) else {
           return .invalid(option:.phoneNumberDigit(phoneNumber))
 }

 return .valid(option:.phoneNumberDigit(phoneNumber))

I detected that NBPhoneNumberUtil.init ().parse returns the error INVALID_CODE_COUNTRY, but I don't know why

aatamburus avatar Nov 04 '20 20:11 aatamburus

Hi, I got the same problem after update from 0.9.15 to 1.0.2 version.

BFTE avatar Nov 10 '20 13:11 BFTE

And i got the same problem on 1.0.2 version. Version 1.0.0 works fine.

jlab13 avatar Nov 14 '20 09:11 jlab13

did anyone figure out why 1.0.2 doesn't work out of the box when you upgrade from 0.9.15. what happens in my case, is the number is nil before it is send to be validated. Nothing has changed in the code. used to work before. Please let me know. I upgraded to get the latest metadata, but if there is a way to get the new metadata without having to upgrade to 1.0.2. I can do that too.

nearbyestatesales avatar Nov 21 '20 21:11 nearbyestatesales

This did the trick for me! https://github.com/iziz/libPhoneNumber-iOS/issues/324

simonmitchell avatar Dec 10 '20 18:12 simonmitchell

Thank you @simonmitchell!

JamesDougherty avatar Oct 07 '21 13:10 JamesDougherty