Business telephone number format mask
⚠ Have you searched for similar, already existing issues?
Yes, and I couldn't find one.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. For example: I'm always frustrated when [...]
I contributed some local business details to OSM from OM recently but received comments from another mapper that the format of telephone numbers I had provided wasn't in line with OSM standards.
Use +CC XXX XXX XXX format, where CC is a country code.
Source: https://wiki.openstreetmap.org/wiki/Key:phone
Describe the ideal solution A clear and concise description of what you want to see in Organic Maps.
OM could provide string validation so as to ensure that not only are phone numbers of the right length, but also of the right and standardised format.
Describe alternatives you have considered
- How do you solve this issue now with Organic Maps or other apps?
- Attach any examples, screenshots, or screen recordings from other apps that help us to better understand the idea.
This would otherwise require users to adhere to this format. In my case, I was unaware of the standard format, so perhaps a guidance text when entering a phone number would be helpful.
Additional context Add any other context or screenshots about the feature request here.
Im not sure about forcing users to add a country code. These codes are often left out on signs, so tourists who don't know the number might not be able to add the phone number at all then. (A phone number without country code is better than no phone number)
A guidance text is a good idea.
Surely the default country code can be derived from the location of the business in question? Ie. A shop in Poland would prepopulate the country code +48, whereas a shop in the UK would prepopulate with +44. This could be made easier by using one of those drop down lists for the country code allowing you to search by country.
These codes are often left out on signs, so tourists who don't know the number might not be able to add the phone number at all then.
Probably also they cannot establish the call without the country code (not sure how the network operators handle that when roaming)
@kirylkaveryn Would it be okay to use a dependency like PhoneNumberKit?
Using this, the numbers in the editor input could be automatically formatted. The region prefix should be set via the defaultRegion string not from the user locale but from the map area.
https://github.com/marmelroy/PhoneNumberKit
