On 7/31/07, <b class="gmail_sendername">Madison Kelly</b> &lt;<a href="mailto:mkelly@alteeve.com">mkelly@alteeve.com</a>&gt; wrote:<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
[..]</blockquote><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>How might I go about checking telephone numbers from both NA and<br>
international?</blockquote><div><br>Hi Madison,<br><br>How rigorous does this test have to be? Once you&#39;ve answered that question, then you can move towards a solution.<br><br>If the answer is &#39;not that rigorous&#39;, I&#39;d suggest you ask for the phone number in an International format, which is
<br><br>&nbsp; + $countryCode $everythingElse<br><br></div></div>Since North America is where the phone was developed, we get the #1 country code, and everything else is a three digit area code and a seven digit number. Other country&#39;s numbers vary, even within countries, I think.
<br><br>Or you can go the other route and follow E.164 (<a href="http://en.wikipedia.org/wiki/E.164">http://en.wikipedia.org/wiki/E.164</a>). That&#39;s useful, actually, as it limits a phone number to 15 digits.<br><br>So as long as the phone number string consists of just numbers, spaces, hyphens and perhaps a leading &#39;+&#39;, and as long as there are no more than 15 digits, I&#39;d say it passes.
<br><br>-- <br>Alex Beamish<br>Toronto, Ontario<br>aka talexb