Closed gedw99 closed 6 months ago
The way it works now requires 2 fields.
Country code and then phone number .
It’s likely possible to also provide a web gui and API that can do it with a single field and smart responses to hint to the user ?
For example humans tend to not put in the country code , but we can detect their country code from their IP address, and so add it for them , etc.
there are some very good golang packages for detecting a users country via the IP they come in on and mapping that to an ENUM country code.
https://github.com/ip2location/ip2location-go Is just one of these packages.
there are ones that embed the meta data just like this repo does , which is better .
I need to stress this project is strictly a port of https://github.com/google/libphonenumber so we only add functionality if it also exists in that project.
The way it works now requires 2 fields.
Country code and then phone number .
It’s likely possible to also provide a web gui and API that can do it with a single field and smart responses to hint to the user ?
For example humans tend to not put in the country code , but we can detect their country code from their IP address, and so add it for them , etc.
there are some very good golang packages for detecting a users country via the IP they come in on and mapping that to an ENUM country code.
https://github.com/ip2location/ip2location-go Is just one of these packages.
there are ones that embed the meta data just like this repo does , which is better .