iziz / libPhoneNumber-iOS

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

isValidNumber returning false for US Area Code 840 #363

Open ande- opened 2 years ago

ande- commented 2 years ago
let nbNumber = try? NBPhoneNumberUtil.sharedInstance().parse("+18402685385", defaultRegion: "US")
let isValid = NBPhoneNumberUtil.sharedInstance().isValidNumber(nbNumber)

Actual: isValid is false Expected: isValid is true

libPhoneNumber-iOS version 0.8 Xcode 13.2.1 iPhone 13 iOS 15.3.1

It looks like 840 became a valid US area code in February 2021, so maybe it simply needs to be added.