#parser #iban

iban_parser

A zero-dependency hobby crate that can be used to parse ibans

5 releases

0.2.2 Oct 24, 2023
0.2.1 Sep 13, 2023
0.2.0 Sep 13, 2023
0.1.2 Aug 25, 2023
0.1.0 Aug 25, 2023

#3 in #iban

Download history 4/week @ 2024-02-18 5/week @ 2024-02-25 1/week @ 2024-03-03 1/week @ 2024-03-10 73/week @ 2024-03-31

74 downloads per month

MIT license

12KB
218 lines

About

A zero-dependency, lightweight IBAN validator✨

This is a hobby project where I learn both about IBANs and how they are validated, and the Rust language.

As it's a hobby project, I can't guarantee it will work 100% of the time. I'm still learning, about both IBAN validation in general and Rust.

Looking for a just a validator? Check out my iban_validator package!

Out of scope

Things I haven't taken into account as of the time of writing:

  • Countries where the validation is slightly different
  • Countries that have additional validation on top of the generic IBAN validation
  • Changing a machine-readable IBAN into a nice, human-readable one

Please bear with me until I've done this, or help out and make your own MR :)

Usage

parse_iban() will take the IBAN string and parse it to a Iban struct, so you can get information like the country code, BBAN, check digits etc. Will also perform the validity check, and return an is_valid property as well.

No runtime deps