[PHP] Phone number validation

2006-03-12 Thread Paul Goepfert
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 (123) 456 7890 123 456 7890 (123) 456 - 7890 123 456-7890 I am using the

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 (123)

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 enter the

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('/[^0-9]/', '',

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

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

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. It seems when I enter

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 what

RE: [PHP] Phone number validation

2006-03-12 Thread Daevid Vincent
Goepfert Subject: Re: [PHP] Phone number validation 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

RE: [PHP] PHP Phone Number Validation

2005-05-17 Thread Kim Madsen
-Original Message- From: IMEX Research [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005 2:49 AM To: php-general@lists.php.net Subject: [PHP] PHP Phone Number Validation OK, I know this has probably gone aruond the list a few times, but how do I validate a phone number

Re: [PHP] PHP Phone Number Validation

2005-05-17 Thread John Nichel
IMEX Research wrote: OK, I know this has probably gone aruond the list a few times, but how do I validate a phone number that is in the format ddd-ddd- ?? I can't figure out how. preg_match ( /^\d{3}-\d{3}-\d{4}$/, $phnumber ) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL

Re: [PHP] PHP Phone Number Validation

2005-05-17 Thread Paul Fierro
On 05/16/2005 7:48 PM, IMEX Research [EMAIL PROTECTED] wrote: OK, I know this has probably gone aruond the list a few times, but how do I validate a phone number that is in the format ddd-ddd- ?? I can't figure out how. I try to not restrict the way your users enter phone numbers or

[PHP] PHP Phone Number Validation

2005-05-16 Thread IMEX Research
OK, I know this has probably gone aruond the list a few times, but how do I validate a phone number that is in the format ddd-ddd- ?? I can't figure out how. Jeremy White IMEX Research Manager, Online Marketing 408-268-0800 1474 Camino Robles San Jose, CA 95120 [EMAIL PROTECTED]

Re: [PHP] Phone number validation

2002-04-08 Thread Jim Lucas [php]
] To: [EMAIL PROTECTED] Sent: Saturday, April 06, 2002 6:52 PM Subject: [PHP] Phone number validation Hi All, I tried to cut a corner and use an alphabetic validation I am using elsewhere $stuff = /^[a-zA-Z]+$/; if(preg_match($stuff, $value)) looks like I forgot about +( )- being in phone

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

Re: [PHP] Phone number validation

2002-04-07 Thread Richard Baskett
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 numbers out and just store the number as a string of numbers.. Then do validation

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

Re: [PHP] Phone number validation

2002-04-07 Thread Richard Baskett
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 Stewart wrote: Just as a curiosity - (I dont need / Want it now

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 validating

[PHP] Phone number validation

2002-04-06 Thread Gary
Hi All, I tried to cut a corner and use an alphabetic validation I am using elsewhere $stuff = /^[a-zA-Z]+$/; if(preg_match($stuff, $value)) looks like I forgot about +( )- being in phone number. What is the easiest way to allow these 4 characters? Are there any other characters that

Re: [PHP] Phone number validation

2002-04-06 Thread Jason Cribbins
PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 06, 2002 8:52 PM Subject: [PHP] Phone number validation : Hi All, : I tried to cut a corner and use an alphabetic validation I am using : elsewhere : $stuff = /^[a-zA-Z]+$/; : if(preg_match($stuff, $value)) : : looks like I forgot about

Re: [PHP] Phone number validation

2002-04-06 Thread Justin French
PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 06, 2002 8:52 PM Subject: [PHP] Phone number validation : Hi All, : I tried to cut a corner and use an alphabetic validation I am using : elsewhere : $stuff = /^[a-zA-Z]+$/; : if(preg_match($stuff, $value)) : : looks like I forgot

Re: [PHP] Phone number validation

2002-04-06 Thread Richard Baskett
: 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. Its an old habit I have although I forget where I picked that up from. I am sure it was when I was working