We are using this library to validate any phone number against country code like this -
i, err := libphonenumber.Parse(input, countryCode) if err != nil { return nil, err } p.i = i p.region = libphonenumber.GetRegionCodeForNumber(i)
when we tried a valid Canadian phone number +16728902474 and countryCode='CA' it returns empty region
After debugging we found that it does not return the number as FIXED_LINE_OR_MOBILE on github.com/ttacon/libphonenumber/phonenumberutil.go line#2087