Rails 3 and 4 Bank Routing Number validator
This gem is intended to be a minimal application of validations provided in
larger libraries (see ActiveMerchant) if a more minimal implementation is
intended.
Use this gem as if it was just another ActiveModel validator (because it is)
class MyModel < ActiveRecord
validates :my_routing_number, :routing_number => true
end
billing_info = MyModel.new(invalid_routing_number_params)
billing_info.valid? => falseAdd this line to your application's Gemfile:
gem 'routing_number_validator'then run:
$ bundle
Then add the following to your model:
validates :my_routing_number, :routing_number => true- Fork it ( https://github.com/[my-github-username]/routing_number_validator/fork )
- 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 a new Pull Request
