iban_validate 2.0.0

A small crate to verify IBAN account numbers.
Documentation

iban_validate

Crates.io Travis Build Status Appveyor Build Status Coverage Status Average time to resolve an issue Percentage of issues still open Rust

This is a small crate that is able to validate an IBAN account number.

Usage

The crate can be found on crates.io. To use this crate, just add it as an dependency:

[dependencies]
iban_validate = "2.0.0"

Functionality

This crate provides an easy way to validate an IBAN (International Bank Account Number). To do so, you can use the function parse(). If you want to check whether the address has a valid BBAN (Basic Bank Account Number), you can use validate_bban(). It also contains some helper methods to make handling an IBAN easier.

Example

The following example does a full validation of the IBAN and BBAN format.

use iban::Iban;
use iban::BbanResult;

let account = "DE44500105175407324931".parse::<Iban>()?;

assert_eq!(account.validate_bban(), BbanResult::Valid);
assert_eq!(account.get_country_code(), "DE");
assert_eq!(account.get_check_digits(), 44);
assert_eq!(account.get_bban(), "500105175407324931");

Documentation

The full documentation is available at docs.rs.

Contributing

If you experience issues with this crate or want to help, please look here.

Stability

This crate has the goal of being usable on the latest stable version of Rust. Its minimum version is documented and tested against, although no extra effort is taken to support earlier versions. The minimum version of Rust can be increased, although this corresponds to a new major release. The crate does not use unsafe itself, although dependencies might. Breaking changes are not avoided in new major versions, although these will always be well-documented and the process of upgrading made clear.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.