Skip to content
/ clabe Public

Ruby gem to validate and get details from a CLABE

License

Notifications You must be signed in to change notification settings

yellowme/clabe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages