dongri / phonenumber

With a given country and phone number, validate and format the MOBILE phone number to E.164 standard
MIT License
181 stars 44 forks source link

issue with indonesia phone number #14

Closed teguh11 closed 3 years ago

teguh11 commented 3 years ago

Hello. i use your library. but i have issue with my local provider. in indonesia phone number with 0821xxxxxxxx, 0822xxxxxxxx, 0852xxxxxxxx use indonesian provider. but with your library that number detect from korea and hongkong.

dongri commented 3 years ago

@teguh11 hello https://en.wikipedia.org/wiki/Telephone_numbers_in_Indonesia indonesia contry code is +62 you can try

includeLandLine = false
country = phonenumber.GetISO3166ByNumber("62821xxxxxxx", includeLandLine)
fmt.Println(country.CountryName) // Indonesia

This library does not support detection of mobile phone numbers only. Please add country code.