Validate, unit tests

From: Date: Tue, 12 Oct 2010 00:44:30 +0000
Subject: Validate, unit tests
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53847@lists.php.net to get a copy of this message
Hey all, Does anyone know enough about "iban" to get the validate_finance tests passing? http://test.pear.php.net:8080/cruisecontrol/buildresults/Validate Alternatively; anyone want to take a stab at RFC822 email address validation by swapping away from One Big Regexp to into disqualifying obviously wrong emails first, step by step; using smaller fragments of the regexp and other code? ie; doing things like: $left_braces = substr_count($email, "("); if ($left_braces > 0) { $left_braces -= substr_count($email, '\('); } if ($left_braces > 0) { $left_braces -= substr_count($email, '" quoted string regexp goes here ( "); } $right_braces = substr_count($email, ")"); if ($right_braces > 0) { $right_braces -= substr_count($email, '\)'); } if ($right_braces > 0) { $right_braces -= substr_count($email, '" quoted string regexp goes here ) "); } if ($left_braces != $right_braces) { return false; // There's a mismatch in ()'s! }

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