iziz / libPhoneNumber-iOS

iOS port from libphonenumber (Google's phone number handling library)
Apache License 2.0
2.35k stars 459 forks source link

Invalid Australian phone number #387

Open pedrosilva88 opened 1 year ago

pedrosilva88 commented 1 year ago

My app is trying to validate this number 0567 427 942 by using this: [phoneUtil isValidNumber:[phoneUtil parse:"0567427942" defaultRegion:"AU" error:&error]]

But I'm receiving as invalid, but we know that this number is in fact an Australian Phone Number. We also tried to change the 0 for the country code 61, but without success we keep receiving this as invalid.

Can you help me with this?

darkengine commented 1 year ago

Having the same issue with the 0493 number in Australia. It's an issue with libPhoneNumber, not platform specific, we tested with Android and Golang libPhoneNumber and they failed too.

pedrosilva88 commented 1 year ago

I've started using this SPM Package. It fixed my problem. https://github.com/marmelroy/PhoneNumberKit