From 905297a9759c18edfa87f7db9d39eb0a5f538c22 Mon Sep 17 00:00:00 2001 From: Anastasiia Date: Thu, 22 Feb 2024 21:28:23 +0100 Subject: [PATCH] CY tax number can start with 6 --- src/Vies/Validator/ValidatorCY.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vies/Validator/ValidatorCY.php b/src/Vies/Validator/ValidatorCY.php index 7d3e20b..3cdd866 100644 --- a/src/Vies/Validator/ValidatorCY.php +++ b/src/Vies/Validator/ValidatorCY.php @@ -20,7 +20,7 @@ * Range: * C1 ... C8 Numeric from 0 to 9 * C9 Alphabetic - * C1 0, 1, 3, 4, 5, 9 + * C1 0, 1, 3, 4, 5, 6, 9 * * Rules: * C1 C2 @@ -41,7 +41,7 @@ public function validate(string $vatNumber): bool return false; } - return in_array((int) $vatNumber[0], [0, 1, 3, 4, 5, 9], true) + return in_array((int) $vatNumber[0], [0, 1, 3, 4, 5, 6, 9], true) && ctype_alpha($vatNumber[8]); } }