VINdicator is a small gem that will allow you to verify that a VIN is valid based on its check digit.
Add this line to your application's Gemfile:
gem 'vindicator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install vindicator
Using a VIN, call valid_vin? and it will return true or false.
$ Vindicator.valid_vin?('5GZCZ43D13S812715') => true
$ Vindicator.valid_vin?('TGZCZ43D13S812715') => false
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request