iban
Version, currently main branch1 version
- main branchlatestJun 7, 2021
github.com/sikoba/IBAN.cr
No description declared in shard.yml.
2 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
iban:
github: sikoba/IBAN.cr
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 0.36.0- License
- MIT
- Authors
- Dragan Postolovski, Alex Kampa
- Target
ibanfrom src/iban.cr
Dependencies
This version declares no dependencies.
README
IBAN.cr
Verifies the validity of IBAN International Bank Account Numbers. Verification of national check digits is not implemented.
Using this shard
Add to your shard.yml
dependencies:
iban:
github: sikoba/iban.cr
Then add at the beginning of your .cr
require "iban"
Check IBAN format (true/false)
Correct IBAN:
iban = "BE71 0961 2345 6769"
res = Iban.validate(iban) #=> true
Incorrect IBAN:
iban = "BE17 0961 2345 6769"
res = Iban.validate(iban) #=> false
Check IBAN format (with explicit messages)
Correct IBAN:
iban = "BE71 0961 2345 6769"
res = Iban.validate_with_feedback(iban) #=> "OK"
Incorrect IBAN:
iban = "BE17 0961 2345 6769"
res = Iban.validate_with_feedback(iban) #=> "IBAN checksum incorrect"
Format IBAN in the standard way
iban = " Br150 0000000000 01093 2840814p2 "
res = Iban.display(iban) #=> "BR15 0000 0000 0000 1093 2840 814P 2"
Note that this function does not check if the IBAN format is correct!
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 7, 2021
- Crystal
>= 0.36.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sikoba/IBAN.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1