Re: Validation class method (ssn)

From: Date: Fri, 07 Jun 2002 06:53:50 +0000
Subject: Re: Validation class method (ssn)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6775@lists.php.net to get a copy of this message
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"); } ?> Tomas V.V.Cox

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