vin-decoder icon indicating copy to clipboard operation
vin-decoder copied to clipboard

Validate: Non-NA VINs don't have checksum

Open kevindekemele opened this issue 1 year ago • 0 comments

Added support for EU and World VINs, to ignore the checksum logic:

https://www.johndcook.com/blog/2019/09/12/vin-check-sum/#:~:text=The%20check%20sum%20is%20in,the%20VIN%2C%20the%209th%20character.

validate(vin,checksum) now supports checksum='eu' or 'world' which will skip over the checksum logic.

Added this to test.js:

 it('EU VINs do not have check sum', () => {
    validate('YV1MC5851CJ126651','eu').should.equal(true);
  });

kevindekemele avatar May 31 '23 09:05 kevindekemele