Skip to content

Comments

Validate: Non-NA VINs don't have checksum#23

Open
kevindekemele wants to merge 2 commits intofrankely:mainfrom
kevindekemele:eu-support
Open

Validate: Non-NA VINs don't have checksum#23
kevindekemele wants to merge 2 commits intofrankely:mainfrom
kevindekemele:eu-support

Conversation

@kevindekemele
Copy link

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);
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant