cvs: pear /Validate/Validate US.php

From: Date: Sun, 16 Feb 2003 17:25:09 +0000
Subject: cvs: pear /Validate/Validate US.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8888@lists.php.net to get a copy of this message
pajoye Sun Feb 16 12:25:09 2003 EDT Modified files: /pear/Validate/Validate US.php Log: Add multiple support to ssn Index: pear/Validate/Validate/US.php diff -u pear/Validate/Validate/US.php:1.6 pear/Validate/Validate/US.php:1.7 --- pear/Validate/Validate/US.php:1.6 Sat Jan 4 06:56:29 2003 +++ pear/Validate/Validate/US.php Sun Feb 16 12:25:09 2003 @@ -17,7 +17,7 @@ // | Tim Gallagher <timg@sunflowerroad.com> | // +----------------------------------------------------------------------+ // -// $Id: US.php,v 1.6 2003/01/04 11:56:29 mj Exp $ +// $Id: US.php,v 1.7 2003/02/16 17:25:09 pajoye Exp $ // // Specific validation methods for data used in the United States // @@ -35,6 +35,9 @@ */ function ssn($ssn, $high_groups = null) { + if(is_array($ssn)){ + extract($ssn); + } // remove any dashes, spaces, returns, tabs or slashes $ssn = str_replace(array('-','/',' ',"\t","\n"), '', $ssn); @@ -65,6 +68,9 @@ */ function ssnGroupRange($groupNumber) { + if(is_array($groupNumber)){ + extract($groupNumber); + } if ($groupNumber < 10) { // is the number odd? if ($groupNumber % 2) { @@ -94,6 +100,9 @@ */ function ssnCheck($area, $group, $serial, &$high_groups) { + if(is_array($area)){ + extract($area); + } // perform trivial checks // no field should contain all zeros if (!($area && $group && $serial)) {

« previous php.pear.cvs (#8888) next »