summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Inman <james@jamesinman.co.uk>2012-11-13 10:23:55 +0000
committerJames Inman <james@jamesinman.co.uk>2012-11-13 10:23:55 +0000
commit9741267c33551d8fb2fba37739e0b0d122378ff7 (patch)
treef8fab49bde29cf5c225e6996909ee70734e287d5
parent7aa5ae8cb2f1dc3343da475828326b8ffc2390d2 (diff)
downloadclockwork-php-9741267c33551d8fb2fba37739e0b0d122378ff7.zip
clockwork-php-9741267c33551d8fb2fba37739e0b0d122378ff7.tar.gz
clockwork-php-9741267c33551d8fb2fba37739e0b0d122378ff7.tar.bz2
[RELEASE] 1.3.1 - Updated is_valid_msisdn() for 9-digit numbers.
-rw-r--r--CHANGELOG.md6
-rwxr-xr-xclass-Clockwork.php4
2 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bd2d46..bf60238 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,4 +15,8 @@
### 1.3 (September 18th, 2012)
-* Added `is_valid_msisdn()` method. [JI] \ No newline at end of file
+* Added `is_valid_msisdn()` method. [JI]
+
+#### 1.3.1 (November 13th, 2012)
+
+* Updated `is_valid_msisdn()` method to handle 9-digit phone numbers, e.g. Norway. [JI] \ No newline at end of file
diff --git a/class-Clockwork.php b/class-Clockwork.php
index e0a9ea0..9631488 100755
--- a/class-Clockwork.php
+++ b/class-Clockwork.php
@@ -24,7 +24,7 @@ class Clockwork {
/*
* Version of this class
*/
- const VERSION = '1.3.0';
+ const VERSION = '1.3.1';
/**
* All Clockwork API calls start with BASE_URL
@@ -637,7 +637,7 @@ class Clockwork {
* @todo Take an optional country code and check that the number starts with it
*/
public static function is_valid_msisdn($val) {
- return preg_match( '/^[1-9][0-9]{10,14}$/', $val );
+ return preg_match( '/^[1-9][0-9]{9,14}$/', $val );
}
}