Closed ahsan-khalil closed 3 years ago
Got a solution for it.
`do {
let util = NBPhoneNumberUtil()
let number = try util.parse("+923351234567", defaultRegion: "PK")
if util.getNumberType(number) == .MOBILE {
print("mobile type")
} else {
print("other type")
}
} catch { print("cant parse") } `
Describe the solution you'd like Since mobile OTP work on mobile phone only, So, when user completes his number in textField, I want to differentiate whether the user entered telephone number or mobile phone number, so if the user entered telephone number then I can show a related error to him so that he only adds his mobile number.