Not accepting UK as a country
MarkRosemaker opened this issue · 0 comments
MarkRosemaker commented
"UK" does not seem to be accepted as a country, but "GB" is.
When I run:
var num libphonenumber.PhoneNumber
err := libphonenumber.ParseToNumber("0123456789", "GB", &num)
if err != nil {
fmt.Println("error with GB:", err)
return
}
err = libphonenumber.ParseToNumber("0123456789", "UK", &num)
if err != nil {
fmt.Println("error with UK:", err)
return
}
I get:
error with UK: invalid country code
However, according to some resources I've checked, +44 is always referred to the calling code of the United Kingdom.