- 02/xx xx xx xx (inside Czech Republic)
- +420 (0)2/xx xx xx xx (outside Czech Republic)
Actually not. The 0 has been dropped from the phone numbers some years ago. The original scheme was 4 to 8 numbers not starting with 0 for a local number (different districts had different number of phones and thus different number length) or 0 area_code local_number. 02 used to mean Prague. They increased the number of digits as necessary and made the area code required and thus the 0 unnecessary. So 02 12 34 56 78 became 212 345 678.
Regarding +420 (0)2 ... the original country code was 42 so the numbers were +42 0 area_code local_number. After we split with the slovaks our code was "changed" to 420, they were assigned 421. So the international numbers became +420 area_code local_number. In either case +420 02/xx xx xx xx would have one too many zeroes I believe. (Sorry for this lengthy and largely pointless post.)
In either case I think this is a bit too tricky task. Especially if you wanted them to accept the special numbers. 911 in US, 112,150,155,158 and probably a few others in Czech Rep and quite a few more in other countries. I think it's best not to be too strict while validating phone numbers. At least unless you can restrict them to a single country.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|