From 79267c1d5983260c65243676729bee93077a4dc6 Mon Sep 17 00:00:00 2001 From: Kuchiru Date: Thu, 23 Jul 2015 12:11:13 +0200 Subject: Fixed partNumber Length for new format. 123-1234 and 123-12345 are both valid formats now. --- gsxlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index b4eec45..5a6ed33 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -573,7 +573,7 @@ class GsxLib { $result = false; $rex = array( - 'partNumber' => '/^([A-Z]{1,2})?\d{3}\-?(\d{4}|[A-Z]{2})(\/[A-Z])?$/i', + 'partNumber' => '/^([A-Z]{1,2})?\d{3}\-?(\d{4,5}|[A-Z]{2})(\/[A-Z])?$/i', 'serialNumber' => '/^[A-Z0-9]{11,12}$/i', 'eeeCode' => '/^[A-Z0-9]{3,4}$/', // only match ALL-CAPS! 'returnOrder' => '/^7\d{9}$/', -- cgit v1.2.3 From 7301138ff9c7857e25c305e058b9a89f2844871c Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 31 Jul 2015 14:24:14 +0300 Subject: Added support for new dispatchID format --- gsxlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index 5a6ed33..e5b1297 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -578,7 +578,7 @@ class GsxLib 'eeeCode' => '/^[A-Z0-9]{3,4}$/', // only match ALL-CAPS! 'returnOrder' => '/^7\d{9}$/', 'repairNumber' => '/^\d{12}$/', - 'dispatchId' => '/^G\d{9}$/', + 'dispatchId' => '/^[A-Z]+\d{9}$/', 'alternateDeviceId' => '/^\d{15}$/', 'diagnosticEventNumber' => '/^\d{23}$/', 'productName' => '/^i?Mac/', -- cgit v1.2.3