cvs: pear /Validate/Validate NL.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Wed, 15 Dec 2004 14:13:15 +0000 |
| Subject: | cvs: pear /Validate/Validate NL.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-27436@lists.php.net to get a copy of this message | ||
dufuz Wed Dec 15 09:13:15 2004 EDT
Modified files:
/pear/Validate/Validate NL.php
Log:
Now ssn and postalCode actually return a boolean value and the test passes.
http://cvs.php.net/diff.php/pear/Validate/Validate/NL.php?r1=1.9&r2=1.10&ty=u
Index: pear/Validate/Validate/NL.php
diff -u pear/Validate/Validate/NL.php:1.9 pear/Validate/Validate/NL.php:1.10
--- pear/Validate/Validate/NL.php:1.9 Wed Dec 15 07:58:00 2004
+++ pear/Validate/Validate/NL.php Wed Dec 15 09:13:15 2004
@@ -16,7 +16,7 @@
// | Authors: Dave Mertens <zyprexia@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: NL.php,v 1.9 2004/12/15 12:58:00 dufuz Exp $
+// $Id: NL.php,v 1.10 2004/12/15 14:13:15 dufuz Exp $
//
// Specific validation methods for data used in NL
//
@@ -41,7 +41,7 @@
// $strong is not used here at the moment; added for API compatibility
// checks might be added at a later stage
- return (ereg('^[0-9]{4}\ {0,1}[A-Za-z]{2}$', $postcode)); // '1234 AB',
'1234AB', '1234 ab'
+ return (boolean)(ereg('^[0-9]{4}\ {0,1}[A-Za-z]{2}$', $postcode)); // '1234
AB', '1234AB', '1234 ab'
}
/**
@@ -91,7 +91,7 @@
*/
function ssn($ssn)
{
- return (ereg("^[0-9]{9}$", $ssn));
+ return (boolean)(ereg("^[0-9]{9}$", $ssn));
}
/**