From 7eeeec52a53929eafa90cc836bc924128d9323c7 Mon Sep 17 00:00:00 2001 From: Patrick Siemen Date: Sat, 30 May 2020 09:26:47 +0200 Subject: [PATCH] Fix Norway VAT pattern (#32) Co-authored-by: Patrick Siemen --- src/Validator.php | 2 +- tests/ValidatorTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Validator.php b/src/Validator.php index d42636e..0afe7f2 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -44,7 +44,7 @@ class Validator 'LV' => '\d{11}', 'MT' => '\d{8}', 'NL' => '\d{9}B\d{2}', - 'NO' => '\d{9}', + 'NO' => '\d{9}(MVA){0,1}', 'PL' => '\d{10}', 'PT' => '\d{9}', 'RO' => '\d{2,10}', diff --git a/tests/ValidatorTest.php b/tests/ValidatorTest.php index abfe133..e455e5d 100644 --- a/tests/ValidatorTest.php +++ b/tests/ValidatorTest.php @@ -89,6 +89,7 @@ public function getValidVatins() array('IE1234567FA'), // Ireland (since January 2013) array('NL999999999B99'), // The Netherlands array('NO999999999'), // Norway + array('NO999999999MVA'), // Norway (including MVA) array('ES99999999R'), // Spain array('SE999999999901'), // Sweden array('CHE-123.456.788 TVA'), // Switzerland