Re: Validation class method (ssn)

From: Date: Wed, 12 Jun 2002 00:27:40 +0000
Subject: Re: Validation class method (ssn)
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6936@lists.php.net to get a copy of this message
On Fri, 2002-06-07 at 08:53, Tomas V.V.Cox wrote: > Tim Gallagher wrote: > > > > ssns are complex enough that perhaps we should extend the base validate > > class with a ssn class. plus this would allow easier segregation of code > > and minimize bloat in the core validate class. > > we could put it in an appropriate international folder under validate when > > installing too. > > > > Ok, I've opened the first "branch" for localizated validation routines > with the spanish one. Finally the i18n folder won't be used. Just create > a Validate/ISO.php file defining the class ValidateISO. > > Usage will be so: > > <?php > require_once 'Validate/US.php'; > if (!ValidateUS::ssn($_POST['ssn'])) { > die("Bastard supply a correct SSN"); > } > ?> Just a tiny little nit: the class name should be Validate_US. ;-) - Stig -- Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb

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