Re: Validation class method

From: Date: Thu, 06 Jun 2002 15:56:01 +0000
Subject: Re: Validation class method
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6747@lists.php.net to get a copy of this message
On Thu, 6 Jun 2002 11:05:24 -0500 (CDT) Brent Cook <busterb@mail.utexas.edu> wrote: > That's a good idea. What do you think about this simpler version? > > function ssn($inbound) > { > // remove any dashes, spaces, returns, tabs or slashes > $inbound = str_replace(array('-','/',' > ',"\t","\n"),'',$inbound); > > // check if this is a 9-digit number > return (is_int($inbound) && (strlen($inbound) == 9)); > } > > - Brent is "123456789" a valid ssn ? :) just curious, pa

« previous php.pear.dev (#6747) next »