Nat's
Nat's

Reputation: 11

Not able to validate Emergency Number like 911 using pod PhoneNumberKit 3.3 in iOS

I am using pod 'PhoneNumberKit', '~> 3.3' PhoneNumber is correctly validating with country code. but when I tried below code, it gives me error.

do {

let emergencyNumber = "+1 911"
let phoneNumberCustomDefaultRegion = try phoneNumberKit.parse(emergencyNumber, withRegion: "US", ignoreType: false)
    
 }
 catch {
   print("Generic parser error \(error.localizedDescription)")
 }
    

Error: Generic parser error The number provided is invalid.

Any Help will be really appreciated. Thanks in Advance.

Upvotes: 1

Views: 132

Answers (0)

Related Questions