On 2017-09-05 21:01, Lukas Sommer wrote: > It would likely yet help a lot if th editors would simply check if > > - the number does not start with “+” > - the number (after the starting “+” sign) contains other characters > then digits, spaces (and maybe dashes). > > This is quite simple and could nevertheless catch yet a lot of issues… Yes it is not too complicated. Typing this at Ubuntu or any Linux command line does what you say:
$ read -p 'Phone number: ' number; [[ $number =~ ^[+][0-9\ \-]*$ ]] && echo GOOD Phone number: 866 356 8207 Phone number: +1 866-356-8207 GOOD It can be included in a program and easily improved to enforce a separated country code, maximum of digits, etc. I'll suggest this to JOSM and they'll probably do it. They're the best. Use JOSM. JOSM is the best. Using Ubuntu/Linux is fun. One can even use it without leaving Windows: Install VirtualBox and use it to install Linux. Ubuntu MATE recommended. Cheers André. > 2017-09-05 16:51 GMT, marc marc <[email protected]>: >> Hello, >> >> on the french-speaking mailing, a contributor noticed a high rate >> of incorrect value for the tag "phone". the most common error is using >> the national format number instead of the international format. >> >> A monthly project 'll maybe fix some of those errors. >> Some quality tool can help those fix. >> >> But the best would be to avoid the mistake when a user fill >> in the data in iD, josm or whatever. >> >> Is anyone aware of a kind of "preset" that can be used for phone ? >> Otherwise it would be useful to create with local communities a wiki >> page containing a list of valid prefixes example + 322xxxxxxx is valid, >> +331xxxxxxxx also but 01xxxxxxxx is not valid in France. >> Or using something like https://github.com/googlei18n/libphonenumber/ >> https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#where-do-we-get-information-from-to-determine-if-a-number-range-is-valid >> >> Would it also be useful to put a corrective suggestion? >> for example 01xxxxxxxx #+331xxxxxxxx >> >> Of course, I am not talking about the exact form of the list, >> nor the fact that some countries will have a list, >> while others not. >> nor the difficulty when a poi has several corresponding numbers >> attached several countries. >> I 'm talking about the general guideline. >> >> The aim is not to forbid some values but to allow >> common editor to guide the user to avoid a very common error. >> _______________________________________________ >> Tagging mailing list >> [email protected] >> https://lists.openstreetmap.org/listinfo/tagging >> >
_______________________________________________ Tagging mailing list [email protected] https://lists.openstreetmap.org/listinfo/tagging
