Skip to content

Commit

Permalink
Fix BE VAT validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nutama committed Oct 31, 2023
1 parent d2ea136 commit 09598b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/IsoCodes/Vat.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Vat implements IsoCodeInterface
*/
public static $patterns = [
'AT' => 'U[A-Z\d]{8}',
'BE' => '0\d{9}',
'BE' => '(0|1)\d{9}',
'BG' => '\d{9,10}',
'CY' => '\d{8}[A-Z]',
'CZ' => '\d{8,10}',
Expand Down
3 changes: 2 additions & 1 deletion tests/IsoCodes/Tests/VatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function getValidValues()
['EL123456789'],
['PT123456789'],
['BE0123456789'],
['BE1234567890'],
['PL1234567890'],
['SK1234567890'],
['ATU12345678'],
Expand Down Expand Up @@ -82,7 +83,7 @@ public function getInvalidValues()
['EL123456'],
['PT12345'],
['BE123456789'],
['BE1234567890'],
['BE2234567890'],
['BE1234'],
['PL123'],
['SK12'],
Expand Down

0 comments on commit 09598b5

Please sign in to comment.