-
Notifications
You must be signed in to change notification settings - Fork 5
US number start with 945 are considered as invalid #2
Copy link
Copy link
Open
Description
I am using this library in my application on the login screen. One of the users reported that he is getting an invalid phone number error even though his phone number is valid.
Input phone number: +1-945-xxx-xxxx
Validation code: (PhoneNumberUtil's extension method)
import com.google.i18n.phonenumbers.PhoneNumberUtil
import timber.log.Timber
fun PhoneNumberUtil.isValidPhoneNumber(phoneNumber: String): Boolean {
val phoneNumberProto = try {
this.parse(phoneNumber, null)
} catch (e: Exception) {
Timber.e(
e,
"Error parsing phone number: $phoneNumber"
)
return false
}
return this.isValidNumber(phoneNumberProto)
}
Let me know if you need any other information to reproduce this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels