Skip to content
forked from yellowme/clabe

Ruby gem to validate and get details from a CLABE

License

Notifications You must be signed in to change notification settings

factorialco/clabe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLABE validator

Installation

  • Add gem "clabe" to your application's Gemfile and then execute bundle.
  • Or install it yourself as: gem install clabe

Usage

Validate and serialize

Successfully validation

CLABE = '002114016003269412'
Clabe.validate(CLABE)
# returns { is_valid: true, bank_tag: 'BANAMEX', city: 'Huixtla' }

Invalid validation

CLABE = '002010077777777779'
Clabe.validate(CLABE)
# returns { is_valid: false, error: 'Must have a valid control digit' }

License

The gem is available as open source under the terms of the MIT License.

Contributing

Bug reports and pull requests are welcome on GitHub at yellowme/clabe.

Development

After checking out the repo. run rake spec to run the tests.

Extra

Strongly based on this JS version center-key/clabe-validator

About

Ruby gem to validate and get details from a CLABE

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%