Skip to content

Commit

Permalink
Merge branch 'fixes_spanish_vat_pattern' of https://github.com/Swop/vat
Browse files Browse the repository at this point in the history
… into Swop-fixes_spanish_vat_pattern
  • Loading branch information
dannyvankooten committed Jan 16, 2020
2 parents 97c9b67 + 6e84328 commit 094c3b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Validator
'DK' => '(\d{2} ?){3}\d{2}',
'EE' => '\d{9}',
'EL' => '\d{9}',
'ES' => '[A-Z]\d{7}[A-Z]|\d{8}[A-Z]|[A-Z]\d{8}',
'ES' => '(?:[A-Z]\d{7}[A-Z]|\d{8}[A-Z]|[A-Z]\d{8})',
'FI' => '\d{8}',
'FR' => '[A-Z\d]{2}\d{9}',
'GB' => '\d{9}|\d{12}|(GD|HA)\d{3}',
Expand Down
1 change: 1 addition & 0 deletions tests/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public function testValidateVatNumberFormat()
'SI1234567',
'SK123456789',
'fooGB999999973', // valid VAT number but with string prefix
'ESB1234567C_invalid_suffix',
];

foreach ($invalid as $format) {
Expand Down

0 comments on commit 094c3b8

Please sign in to comment.