cvs: pear /Validate/Validate NL.php
| From: | Dave Mertens | Date: | Tue, 07 Oct 2003 19:47:45 +0000 |
| Subject: | cvs: pear /Validate/Validate NL.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13468@lists.php.net to get a copy of this message | ||
zyprexia Tue Oct 7 15:47:45 2003 EDT
Modified files:
/pear/Validate/Validate NL.php
Log:
Added VALIDATE_NL_ prefix to constants
Index: pear/Validate/Validate/NL.php
diff -u pear/Validate/Validate/NL.php:1.1 pear/Validate/Validate/NL.php:1.2
--- pear/Validate/Validate/NL.php:1.1 Mon Oct 6 17:26:25 2003
+++ pear/Validate/Validate/NL.php Tue Oct 7 15:47:45 2003
@@ -16,16 +16,16 @@
// | Authors: Dave Mertens <zyprexia@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: NL.php,v 1.1 2003/10/06 21:26:25 zyprexia Exp $
+// $Id: NL.php,v 1.2 2003/10/07 19:47:45 zyprexia Exp $
//
// Specific validation methods for data used in NL
//
require_once('Validate.php');
-define( "PHONENUMBER_TYPE_ANY", 0); //Any dutch phonenumber
-define( "PHONENUMBER_TYPE_NORMAL", 1); //only normal phonenumber (mobile numers are
not allowed)
-define( "PHONENUMBER_TYPE_MOBILE", 2); //only mobile numbers are allowed
+define( "VALIDATE_NL_PHONENUMBER_TYPE_ANY", 0); //Any dutch phonenumber
+define( "VALIDATE_NL_PHONENUMBER_TYPE_NORMAL", 1); //only normal phonenumber (mobile
numers are not allowed)
+define( "VALIDATE_NL_PHONENUMBER_TYPE_MOBILE", 2); //only mobile numbers are allowed
class Validate_NL
{
@@ -61,14 +61,14 @@
if (strlen($number) >= 9)) {
switch ($type)
{
- case PHONENUMBER_TYPE_ANY:
+ case VALIDATE_NL_PHONENUMBER_TYPE_ANY:
$result = true; //we have a 9 digit numeric number.
break;
- case PHONENUMBER_TYPE_NORMAL:
+ case VALIDATE_NL_PHONENUMBER_TYPE_NORMAL:
if ((int)$number[0] != 6)
$result = true; //normal phonenumbers don't begin with 6
(00316, +316 and 06 are reserved for mobile numbers)
break;
- case PHONENUMBER_TYPE_MOBILE:
+ case VALIDATE_NL_PHONENUMBER_TYPE_MOBILE:
if ((int)$number[0] == 6)
$result = true; //mobilenumbers start with a 6
break;
@@ -92,4 +92,4 @@
return (ereg("^[0-9]{9}$", $number));
}
}
-?>
\ No newline at end of file
+?>