<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I would not be too hard to make a validity checker for any phone:*=* field. By the wiki [1] we should be formatting the number per ITU E.123. That requires a leading “+” and a space delimiter between digits groups. [2]<div class=""><br class=""></div><div class="">More over, all international telephone numbers need to conform to ITU E.164 [3] in order to be called. That specification calls for the full number (including the country code, area/city code, exchange and local portion of the number) to be no more than 15 digits. In addition, country code starts after the “+” symbol. Looking at the assigned country codes, the first thing that is evident is that no country code starts with a “0”. [4]</div><div class=""><br class=""></div><div class="">So a simple validator that assures that the string starts with a “+” followed by a digit in the range 1..9, containing only the characters 0..9 and space with no more than 15 digits will catch a huge number of issues.</div><div class=""><br class=""></div><div class="">Given that the list of country codes is finite and the numbering plans for each country is fixed, one could get fancier and assure the correct number and format of digits for the jurisdiction. But that would require basically a small database that will need maintenance so I would avoid that until it is shown that level of error detection is needed.<br class=""><div class=""><br class=""></div><div class="">Been a while since I worked in telephony, but what Wikipedia shows for E.123 and E.164 looks pretty unchanged from what I remember from back when ITU was CCITT.</div><div class=""><br class=""></div><div class="">Cheers!</div><div class=""><br class=""></div><div class="">[1] <a href="https://wiki.openstreetmap.org/wiki/Key:phone#Usage" class="">https://wiki.openstreetmap.org/wiki/Key:phone#Usage</a></div><div class="">[2] <a href="https://en.wikipedia.org/wiki/E.123" class="">https://en.wikipedia.org/wiki/E.123</a></div><div class="">[3] <a href="https://en.wikipedia.org/wiki/E.164" class="">https://en.wikipedia.org/wiki/E.164</a></div><div class="">[4] <a href="https://en.wikipedia.org/wiki/List_of_country_calling_codes" class="">https://en.wikipedia.org/wiki/List_of_country_calling_codes</a></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 5, 2017, at 2:48 PM, Graeme Fitzpatrick <<a href="mailto:graemefitz1@gmail.com" class="">graemefitz1@gmail.com</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On 6 September 2017 at 02:51, marc marc <span dir="ltr" class=""><<a href="mailto:marc_marc_irc@hotmail.com" target="_blank" class="">marc_marc_irc@hotmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br class="">
<br class="">
on the french-speaking mailing, a contributor noticed a high rate<br class="">
of incorrect value for the tag "phone". the most common error is using<br class="">
the national format number instead of the international format.<br class=""></blockquote><div class=""><br class=""></div><div class="">I'll admit to being guilty here, in that I enter numbers in my part of Australia as 07xxxxxxxx, working on the basis that most people using this info to ring the establishment will be making local, or at most, inside-Australia calls. I know, sorry, I should be thinking internationally! :-)</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But the best would be to avoid the mistake when a user fill<br class="">
in the data in iD, josm or whatever.<br class="">
<br class="">
Is anyone aware of a kind of "preset" that can be used for phone ?<br class=""></blockquote><div class=""><br class=""></div><div class="">Would the easiest way be to format the telephone number box so that it has a non-erasable + as the beginning symbol? </div></div><br class=""></div><div class="gmail_extra">Thanks</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Graeme</div></div>
_______________________________________________<br class="">Tagging mailing list<br class=""><a href="mailto:Tagging@openstreetmap.org" class="">Tagging@openstreetmap.org</a><br class="">https://lists.openstreetmap.org/listinfo/tagging<br class=""></div></blockquote></div><br class=""></div></div></body></html>