Re: Verify phone format?
| From: | Jeff Lewis | Date: | Tue, 10 Sep 2002 23:45:12 +0000 |
| Subject: | Re: Verify phone format? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115909@lists.php.net to get a copy of this message | ||
If it makes you feel better, it's a site only for Canada.
Jeff
----- Original Message -----
From: "Justin French" <justin@indent.com.au>
To: "Jeff Lewis" <jeff@hyrum.net>; <php-general@lists.php.net>
Sent: Tuesday, September 10, 2002 7:35 PM
Subject: Re: [PHP] Verify phone format?
> The problem you have is that not all phone numbers share that format...
mine
> for example (Australia) is 61 3 XXXX XXXX (that is, CountryCode, State,
> Exchange, Number). So it depends on who will fill out your form... if
> you're talking international, you may want to think twice.
>
> It never ceases to frustrate me when global sites (usually based in the US
> I've found) tend to think that "their way" is the only way. Countless
times
> where the the number format of phone numbers wouldn't let me enter my
number
> correctly, or the state abbreviation was only 2 chars (Australia is 3, eg
> VIC), only allowing me to select a US state (no "other" option) -- but
still
> allowing me to select "Australia" from the country list, etc etc.
>
> The best way to make people conform is to break the number into multiple
> boxes, for country code, area code, and number.
>
> You can then join them with a -, and even do some small manipulations on
the
> last one (eg putting a - after 4 chars, or whatever), check they're all
> filled out, and then insert the completed, correctly formatted number into
> the database :)
>
>
> Cheers,
> Justin
>
> PS there might be a class to validate to a correct international number
> format, which MAY give you what you want.
>
>
>
> on 11/09/02 1:30 AM, Jeff Lewis (jeff@hyrum.net) wrote:
>
> > Just wondering what the best way to validate an entered phone format is?
Is
> > anyone doing this currently?
> >
> > I have a form field that people enter in information and I want to force
> > phone entries to XXX-XXX-XXXX.
> >
> > Jeff
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>