Skip to content

jordanstephens/vin.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vin.js

Verify a VIN's correctness by validating it's check digit.

Code taken from a StackOverflow answer I wrote in 2010 via the Wikipedia article on VIN Check digit calculation.

Usage

Vin.isValid("11111111111111111") // => true

Known Caveats

  • NHTSA standardized the format in 1981, so validation for older vehicles is not guaranteed.
  • Check digit validation is not compulsory for cars not destined for the North American market, and does not apply to all vehicles. Exceptions may include: Citroën, BMW, Renault, Audi, Korean Chevrolets, Fiat and European Fords, among others. See the above Wikipedia article for more info.
  • The following VIN, a 2012 Subaru Impreza 2.0i Premium, for example, does not validate correctly: JF1GPAC6XCH210522

About

Verify a VIN's correctness by validating it's check digit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published