Skip to content

Commit

Permalink
fix(isVAT): fixed KZ VAT number length check (#2279)
Browse files Browse the repository at this point in the history
* fix(isVAT): fixed KZ VAT number length check

* fix(isVAT): fixed KZ VAT number length test
  • Loading branch information
MatthieuLemoine committed Apr 27, 2024
1 parent 8a40349 commit 11ac6a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/isVAT.js
Expand Up @@ -75,7 +75,7 @@ export const vatMatchers = {
IN: str => /^(IN)?\d{15}$/.test(str),
ID: str => /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str),
IL: str => /^(IL)?\d{9}$/.test(str),
KZ: str => /^(KZ)?\d{9}$/.test(str),
KZ: str => /^(KZ)?\d{12}$/.test(str),
NZ: str => /^(NZ)?\d{9}$/.test(str),
NG: str => /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str),
NO: str => /^(NO)?\d{9}MVA$/.test(str),
Expand Down
6 changes: 3 additions & 3 deletions test/validators.test.js
Expand Up @@ -14175,11 +14175,11 @@ describe('Validators', () => {
validator: 'isVAT',
args: ['KZ'],
valid: [
'KZ123456789',
'123456789',
'KZ123456789012',
'123456789012',
],
invalid: [
'KZ 123456789',
'KZ 123456789012',
'12345678',
],
});
Expand Down

0 comments on commit 11ac6a4

Please sign in to comment.