RE: [PHP] Phone number validation

2006-03-12 Thread Daevid Vincent
gt; From: tedd [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 12, 2006 2:20 PM > To: php-general@lists.php.net; Paul Goepfert > Subject: Re: [PHP] Phone number validation > > Paul: > > Also check out: > > http://www.weberdev.com/get_example-3605.html > > tedd > > &

Re: [PHP] Phone number validation

2006-03-12 Thread 2dogs
""Paul Goepfert"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I didn't realize that those were single quotes. I printed out the email message and it looked like one set of double quotes for the second parameter rather the two single quotes. Is it possible for anyone to tell me w

Re: [PHP] Phone number validation

2006-03-12 Thread Anthony Ettinger
On 3/12/06, tedd <[EMAIL PROTECTED]> wrote: > > Paul: > > Also check out: > > http://www.weberdev.com/get_example-3605.html > > tedd > > > >Hi all, > > > >I am trying to validate phone numbers in a web form that I have > >created. I am using a regular expression to validate the phone > >number. I

Re: [PHP] Phone number validation

2006-03-12 Thread tedd
Paul: Also check out: http://www.weberdev.com/get_example-3605.html tedd Hi all, I am trying to validate phone numbers in a web form that I have created. I am using a regular expression to validate the phone number. It seems when I enter the phone number in the following ways I get errors

Re: [PHP] Phone number validation

2006-03-12 Thread Paul Goepfert
I didn't realize that those were single quotes. I printed out the email message and it looked like one set of double quotes for the second parameter rather the two single quotes. Is it possible for anyone to tell me what php method is used to grab the first charater of a string? And onece I have

Re: [PHP] Phone number validation

2006-03-12 Thread Curt Zirzow
On Sun, Mar 12, 2006 at 01:48:28PM -0700, Paul Goepfert wrote: > On 3/12/06, Curt Zirzow <[EMAIL PROTECTED]> wrote: > > > > With US phone numbers I always use this approach to avoid what > > format people use to enter the phone: > > > > > - Remove any non digit $check_phone = > > preg_replace(

Re: [PHP] Phone number validation

2006-03-12 Thread Paul Goepfert
On 3/12/06, Curt Zirzow <[EMAIL PROTECTED]> wrote: > On Sun, Mar 12, 2006 at 12:09:42PM -0700, Paul Goepfert wrote: > > Hi all, > > > > I am trying to validate phone numbers in a web form that I have > > created. I am using a regular expression to validate the phone > > number. It seems when I en

Re: [PHP] Phone number validation

2006-03-12 Thread Curt Zirzow
On Sun, Mar 12, 2006 at 12:09:42PM -0700, Paul Goepfert wrote: > Hi all, > > I am trying to validate phone numbers in a web form that I have > created. I am using a regular expression to validate the phone > number. It seems when I enter the phone number in the following ways > I get errors > >

Re: [PHP] Phone number validation

2002-04-08 Thread Jim Lucas [php]
try this preg_match("/[a-zA-Z]+/i", $str); and if you want to go the other route. do this preg_match("/[^0-9\(\)\-\.\ ]+/i", $str); this will return true if it is anything other then what is listed. numbers 0-9 "(" ")" "-" "." " " Jim Lucas - Original Message - From: "Gary" <[EMAIL

Re: [PHP] Phone number validation

2002-04-07 Thread Gary
Miguel Cruz wrote: > On Mon, 8 Apr 2002, Gordon Stewart wrote: > >>Just as a curiosity - (I dont need / Want it now - Maybe later) >>Where / what site, can we get a list of the valid country/city codes ? >> > > Someone else has already provided you with a site. > > I'd just add that vali

Re: [PHP] Phone number validation

2002-04-07 Thread Richard Baskett
y to learn something." - Tom Clancy > From: Miguel Cruz <[EMAIL PROTECTED]> > Date: Sun, 7 Apr 2002 14:08:42 -0500 (CDT) > To: Gordon Stewart <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Phone number validation > > On Mon, 8 Apr 2002, Gordon

Re: [PHP] Phone number validation

2002-04-07 Thread Miguel Cruz
On Mon, 8 Apr 2002, Gordon Stewart wrote: > Just as a curiosity - (I dont need / Want it now - Maybe later) > Where / what site, can we get a list of the valid country/city codes ? Someone else has already provided you with a site. I'd just add that validating international numbers against a

Re: [PHP] Phone number validation

2002-04-07 Thread Richard Baskett
; Date: Mon, 8 Apr 2002 00:50:09 +1200 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Phone number validation > > > Richard Baskett <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> What I do is strip all non-numeric numbe

Re: [PHP] Phone number validation

2002-04-07 Thread Gordon Stewart
Richard Baskett <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > What I do is strip all non-numeric numbers out and just store the number as > a string of numbers.. Then do validation on those numbers.. Make sure the > right amount of numbers are there, valid co

Re: [PHP] Phone number validation

2002-04-06 Thread Richard Baskett
o: "Jason Cribbins" <[EMAIL PROTECTED]> > Date: Sat, 6 Apr 2002 22:47:46 -0500 > To: <[EMAIL PROTECTED]>, "Gary" <[EMAIL PROTECTED]> > Subject: Re: [PHP] Phone number validation > > Some people use period '.' in between fields...me for one.

Re: [PHP] Phone number validation

2002-04-06 Thread Justin French
FWIW, In Australia, phone numbers are commonly formatted with brackets for area codes: (03) 9876 5432 +61 (3) 9876 5432 +61 3 9876 5432 Also the usual array of +,-,.,etc I'd include ()'s in your reg exp for sure. Justin on 07/04/02 1:47 PM, Jason Cribbins ([EMAIL PROTECTED]) wrote: > Some p

Re: [PHP] Phone number validation

2002-04-06 Thread Jason Cribbins
Some people use period '.' in between fields...me for one. Its an old habit I have although I forget where I picked that up from. I am sure it was when I was working overseas...maybe Asia where I saw all phone numbers using . between fields. - Original Message - From: "Gary" <[EMAIL PRO