On 7/31/07, <b class="gmail_sendername">Madison Kelly</b> <<a href="mailto:mkelly@alteeve.com">mkelly@alteeve.com</a>> 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've answered that question, then you can move towards a solution.<br><br>If the answer is 'not that rigorous', I'd suggest you ask for the phone number in an International format, which is
<br><br> + $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'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'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 '+', and as long as there are no more than 15 digits, I'd say it passes.
<br><br>-- <br>Alex Beamish<br>Toronto, Ontario<br>aka talexb