Skip to content

barsoom/banktools-at

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Austrian bank tools

Ruby CI

Ruby gem to validate Austrian bank account numbers.

Usage

account = BankTools::AT::Account.new("12345678901")
account.valid?  # => true
account.errors  # => []

bad_account = BankTools::AT::Account.new("1")
bad_account.valid?  # => false
bad_account.errors  # => [:too_short]

blz = BankTools::AT::BLZ.new("12345")
blz.valid?  # => true
blz.errors  # => []

bad_blz = BankTools::AT::BLZ.new("1")
bad_blz.valid?  # => false
bad_blz.errors  # => [:too_short]

# Error codes

BankTools::AT::Errors::TOO_SHORT                # => :too_short
BankTools::AT::Errors::TOO_LONG                 # => :too_long
BankTools::AT::Errors::INVALID_CHARACTERS       # => :invalid_characters

Tests

bundle
rspec # or: rake

Installation

Add this line to your application's Gemfile:

gem "banktools-at"

And then execute:

$ bundle

Or install it yourself as:

$ gem install banktools-at

TODO

Also see

License

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

About

Validate Austrian bank account numbers.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •