
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
= Vin-Validator
Gem for gathering info on VINs, optionally using link:https://vpic.nhtsa.dot.gov/api/[NHTSA's API]
== Installation
Add this line to your application's Gemfile:
And then execute:
$ bundle install
Or install it yourself as:
$ gem install vin-validator
== Usage
=== vin_info
just_a_vin = 'AA5325L1588827' other_vins = %w[13N153201K1533942 1E9AA5325L1588827 1RND48A27GR039983 1RND53A33KR049282]
VinValidator::Knowledge.vin_info(just_a_vin).fetch(just_a_vin)
VinValidator::Knowledge.vin_info(just_a_vin, true).fetch(just_a_vin)
VinValidator::Knowledge.vin_info(other_vins)
Every call to VinValidator::Knowledge::vin_info will return a hash.
Each key in the result is one of the VINs provided, and each value is another hash.
Value hash:
|=== |Key |Value
|:errors
|Array<VinValidator::Result>
|:nhtsa_errors
|Array<VinValidator::Result>
|:vin
|VinValidator::Result
|:make
|Array<VinValidator::Result>
|:manufacturer
|VinValidator::Result
|:model
|VinValidator::Result
|:year
|VinValidator::Result
|:body_type
|VinValidator::Result
|:trailer_type
|VinValidator::Result
|:vehicle_type
|VinValidator::Result
|:gvw
|VinValidator::Result
|:suggested_vin
|VinValidator::Result
|===
VinValidator::Result has 3 attributes: vin, type, and value.
vin - The vin the result belongs totype - The type of result (error, make, year, etc)value - The value of the result=== validate
just_a_vin = 'AA5325L1588827' other_vins = %w[13N153201K1533942 1E9AA5325L1588827 1RND48A27GR039983 1RND53A33KR049282]
VinValidator::Knowledge.validate(just_a_vin).fetch(just_a_vin)
VinValidator::Knowledge.validate(just_a_vin, true).fetch(just_a_vin)
VinValidator::Knowledge.validate(other_vins)
Every call to VinValidator::Knowledge::vin_info will return a hash.
Each key in the result is one of the VINs provided, and each value is another hash.
Value hash:
|=== |Key |Value |Description
|:valid
|Boolean
|false if there are errors or year/wmi is blank
|:year
|Hash, Nil
|:letter(String) and :year(Integer)
|:wmi
|Array<VinValidator::Result>
|Possible makes the VIN can have
|:infos
|Array<String>
|The info messages
|:errors
|Array<String>
|The error messages
|===
VinValidator::Result has 3 attributes: vin, type, and value.
vin - The vin the result belongs totype - The type of result (error, make, year, etc)value - The value of the result== Changelog
See xref:./CHANGELOG.adoc[CHANGELOG] see changes
FAQs
Unknown package
We found that vin-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.