I'm using PhoneNumberKit to validate phone numbers but it returns invalid results for my test cases.
let phoneNumberKit = PhoneNumberKit()
do {
let parsedNumber = try phoneNumberKit.parse(phoneNumber, ignoreType: true)
return ""
} catch {
return "\(error.localizedDescription)"
}
Input - +0424466934 / Expected(link) : Invalid country calling code
/ Actual : No error
Input - +6133333 / Expected : No error / Actual : The number provided is invalid
I want to match the validations with google libphonenumber. Any idea why or how to achieve this?