Node VAT code syntax checker
Find a file
2025-08-15 23:49:12 +01:00
.gitignore Remove .idea directory 2015-04-17 12:35:34 +01:00
index.js Now handling spaces in all codes at any place. 2015-03-02 09:17:21 +00:00
LICENSE.md Now handling all EU VAT codes with a small test harness, needs some more tests really 2015-02-26 13:51:51 +00:00
package.json Add deprecation notice and bump to 1.1.1 2025-08-15 23:49:12 +01:00
patterns.js Added VAT validation for Switzerland. (#3) 2018-03-02 09:50:57 +00:00
README.md Add deprecation notice and bump to 1.1.1 2025-08-15 23:49:12 +01:00
tests.js Added VAT validation for Switzerland. (#3) 2018-03-02 09:50:57 +00:00

vatcode-validator

This VAT Code Validator checks the syntax of a VAT code. It doesn't make any API calls to check the validity of the code itself, so the package can be useful for on the fly checking of valid VAT code entry on forms etc.

Project status

Caution

This project has been unmaintained since 2018. You should not use it, and should migrate away from it.

I made this module back in ~2015 to solve a problem my company had at the time. It served it's purpose and still works reasonably well. But I do not use nodejs anymore, and have no intention of publishing any updates in the future.

To prevent supply-chain attacks I will not hand this project over to anyone else.

If you wish to continue the project, please fork it while respecting the copyright notice and license.

Installation

npm install vatcode-validator --save

Example use

var VATValidator = require('vatcode-validator');

var vatCode = '';

if(VATValidator.isValid(vatCode)) {
  console.log('Code is valid');
} else {
  //not valid :(
}