Laravel for Rust Alpha

laravel-rust-iban

Validate, format and inspect IBANs in Rust and Laravel for Rust.

Rust port of globalcitizen/php-iban: IBAN validation, formatting, parsing, national checksums, and country registry data for Laravel for Rust.

Read the docs Source on GitHub

cargo add laravel-rust-iban
Latest release
0.1.0, 2026-12-05
Maintenance
Active
Framework
laravel-rust 0.2.x
MSRV
Rust 1.99 or later
Licence
MIT

PHP parity

Follows globalcitizen/php-iban v5.03b (commit 9f4538ec9077). Last verified .

Parity level
Core
Abilities
59
Covered
14
Diverged
34
Planned
11
PHP fixtures
565

Fixtures are generated by PHP itself: PHP 8.4, globalcitizen/php-iban v5.03b.

Coverage by ability
  • iban.verify · Diverged · Core
    verify_iban($iban, false) / IBAN::Verify()
  • iban.verify.machine_format_only · Diverged · Core
    verify_iban($iban, true) / IBAN::VerifyMachineFormatOnly()
  • iban.format.machine · Covered · Core · 2 tests
    iban_to_machine_format($iban) / IBAN::MachineFormat()
  • iban.format.human · Covered · Core · 2 tests
    iban_to_human_format($iban) / IBAN::HumanFormat()
  • iban.format.obfuscated · Diverged · Core
    iban_to_obfuscated_format($iban) / IBAN::ObfuscatedFormat()
  • iban.checksum.verify · Diverged · Core
    iban_verify_checksum($iban) / IBAN::VerifyChecksum()
  • iban.checksum.find · Diverged · Core
    iban_find_checksum($iban) / IBAN::FindChecksum()
  • iban.checksum.set · Diverged · Core
    iban_set_checksum($iban) / IBAN::SetChecksum()
  • iban.checksum.string_replace · Covered · 2 tests
    iban_checksum_string_replace($s) / IBAN::ChecksumStringReplace()
  • iban.checksum.mod97_10 · Covered · 2 tests
    iban_mod97_10($numeric_representation)
  • iban.checksum.mod97_10_checksum · Covered · 2 tests
    iban_mod97_10_checksum($numeric_representation)
  • iban.config.disable_gmp · Diverged
    PHP GMP arithmetic backend toggle
  • iban.parts.all · Diverged · Core
    iban_get_parts($iban) / IBAN::Parts()
  • iban.parts.country · Covered · Core · 2 tests
    iban_get_country_part($iban) / IBAN::Country()
  • iban.parts.checksum · Covered · Core · 2 tests
    iban_get_checksum_part($iban) / IBAN::Checksum()
  • iban.parts.bban · Covered · Core · 2 tests
    iban_get_bban_part($iban) / IBAN::BBAN()
  • iban.parts.bank · Diverged · Core
    iban_get_bank_part($iban) / IBAN::Bank()
  • iban.parts.branch · Diverged · Core
    iban_get_branch_part($iban) / IBAN::Branch()
  • iban.parts.account · Diverged · Core
    iban_get_account_part($iban) / IBAN::Account()
  • iban.parts.national_checksum · Diverged · Core
    iban_get_nationalchecksum_part($iban) / IBAN::NationalChecksum()
  • iban.national_checksum.verify · Diverged · Core
    iban_verify_nationalchecksum($iban) / IBAN::VerifyNationalChecksum()
  • iban.national_checksum.find · Diverged
    iban_find_nationalchecksum($iban) / IBAN::FindNationalChecksum()
  • iban.national_checksum.set · Diverged
    iban_set_nationalchecksum($iban) / IBAN::SetNationalChecksum()
  • iban.national_checksum.be · Diverged · Core
    National checksum for Belgium (BE)
  • iban.national_checksum.es · Covered · 2 tests
    National checksum for Spain (ES)
  • iban.national_checksum.fr_rib · Diverged
    National checksum for France RIB scheme (FR, MC, UEMOA, CEMAC)
  • iban.national_checksum.it_cin · Covered · 2 tests
    National checksum for Italy and San Marino (IT, SM)
  • iban.national_checksum.mod97_10 · Diverged
    National checksum for ISO 7064 MOD 97-10 countries (ME, MK, PT, RS, SI, TL)
  • iban.national_checksum.nl · Diverged
    National checksum for Netherlands (NL 11-proof, INGB exception)
  • iban.national_checksum.no · Diverged
    National checksum for Norway (NO Mod 11)
  • iban.national_checksum.sk · Diverged
    National checksum for Slovakia (SK Mod 11 verify-only)
  • iban.mistranscription.suggestions · Diverged
    iban_mistranscription_suggestions($iban) / IBAN::MistranscriptionSuggestions()
  • iban.country.list · Diverged · Core
    iban_countries() / IBAN::Countries()
  • iban.country.name · Covered · Core · 2 tests
    iban_country_get_country_name($code) / IBANCountry::Name()
  • iban.country.domestic_example · Planned
    iban_country_get_domestic_example($code) / IBANCountry::DomesticExample()
  • iban.country.bban_example · Planned
    iban_country_get_bban_example($code) / IBANCountry::BBANExample()
  • iban.country.bban_format_swift · Diverged
    iban_country_get_bban_format_swift($code) / IBANCountry::BBANFormatSWIFT()
  • iban.country.bban_format_regex · Diverged
    iban_country_get_bban_format_regex($code) / IBANCountry::BBANFormatRegex()
  • iban.country.bban_length · Diverged · Core
    iban_country_get_bban_length($code) / IBANCountry::BBANLength()
  • iban.country.iban_example · Planned
    iban_country_get_iban_example($code) / IBANCountry::IBANExample()
  • iban.country.iban_format_swift · Diverged
    iban_country_get_iban_format_swift($code) / IBANCountry::IBANFormatSWIFT()
  • iban.country.iban_format_regex · Diverged
    iban_country_get_iban_format_regex($code) / IBANCountry::IBANFormatRegex()
  • iban.country.iban_length · Covered · Core · 2 tests
    iban_country_get_iban_length($code) / IBANCountry::IBANLength()
  • iban.country.bank_id_offsets · Diverged
    iban_country_get_bankid_start_offset / stop_offset / IBANCountry::BankID*
  • iban.country.branch_id_offsets · Diverged
    iban_country_get_branchid_start_offset / stop_offset / IBANCountry::BranchID*
  • iban.country.national_checksum_offsets · Diverged
    iban_country_get_nationalchecksum_start_offset / stop_offset / IBANCountry::NationalChecksum*
  • iban.country.registry_edition · Planned
    iban_country_get_registry_edition($code) / IBANCountry::RegistryEdition()
  • iban.country.swift_official · Covered · 2 tests
    iban_country_get_country_swift_official($code) / IBANCountry::SWIFTOfficial()
  • iban.country.is_sepa · Diverged · Core
    iban_country_is_sepa($code) / IBANCountry::IsSEPA()
  • iban.country.iana · Planned
    iban_country_get_iana($code) / IBANCountry::IANA()
  • iban.country.iso3166 · Planned
    iban_country_get_iso3166($code) / IBANCountry::ISO3166()
  • iban.country.parent_registrar · Planned
    iban_country_get_parent_registrar($code) / IBANCountry::ParentRegistrar()
  • iban.country.currency_iso4217 · Planned
    iban_country_get_currency_iso4217($code) / IBANCountry::CurrencyISO4217()
  • iban.country.central_bank_url · Planned
    iban_country_get_central_bank_url($code) / IBANCountry::CentralBankURL()
  • iban.country.central_bank_name · Planned
    iban_country_get_central_bank_name($code) / IBANCountry::CentralBankName()
  • iban.country.membership · Planned
    iban_country_get_membership($code) / IBANCountry::Membership()
  • iban.country.is_eu_member · Covered · 2 tests
    iban_country_get_is_eu_member($code) / IBANCountry::IsEuMember()
  • iban.oo.iban_wrapper · Diverged
    PHP_IBAN\IBAN
  • iban.oo.country_wrapper · Diverged
    PHP_IBAN\IBANCountry
Differences from PHP (34)
verify_iban($iban, false) / IBAN::Verify()
Validation enforces Release 103, canonical international check digits and a 1024-byte raw limit.
verify_iban($iban, true) / IBAN::VerifyMachineFormatOnly()
Electronic input uses uppercase ASCII and Release 103 BBAN classes, including the Brazilian, Qatari and Salvadoran differences.
iban_to_obfuscated_format($iban) / IBAN::ObfuscatedFormat()
Inputs shorter than six electronic characters return a length error instead of duplicating visible digits.
iban_verify_checksum($iban) / IBAN::VerifyChecksum()
Rejects an international check digit pair outside 02 through 98.
iban_find_checksum($iban) / IBAN::FindChecksum()
Returns a length error for empty input and a structure error for a malformed prefix.
iban_set_checksum($iban) / IBAN::SetChecksum()
Returns a length error for empty input instead of appending the pair 98.
PHP GMP arithmetic backend toggle
Uses one bounded streaming MOD 97-10 implementation without a GMP switch.
iban_get_parts($iban) / IBAN::Parts()
Uses the registered Release 103 bank, branch and account ranges, as recorded in the offset audit.
iban_get_bank_part($iban) / IBAN::Bank()
Uses the Release 103 bank range in the offset audit for countries with different PHP ranges.
iban_get_branch_part($iban) / IBAN::Branch()
Uses the Release 103 branch range and represents an absent branch with None.
iban_get_account_part($iban) / IBAN::Account()
Derives the account from the Release 103 ranges, including the bank-adjacent slice where no branch is registered.
iban_get_nationalchecksum_part($iban) / IBAN::NationalChecksum()
Returns an explicit national check digit slice only, including None for the verified Slovak account segments.
iban_verify_nationalchecksum($iban) / IBAN::VerifyNationalChecksum()
Returns a typed verdict, with canonical keys and the documented country-specific checks and exemptions.
iban_find_nationalchecksum($iban) / IBAN::FindNationalChecksum()
Returns a fixed-width string for explicit check digits and a typed error when calculation is unsupported.
iban_set_nationalchecksum($iban) / IBAN::SetNationalChecksum()
Repairs both check digit pairs when supported and reports a typed error when the supplied account cannot be repaired.
National checksum for Belgium (BE)
Follows TR201 by returning 97 for remainder zero and padding every single-digit remainder.
National checksum for France RIB scheme (FR, MC, UEMOA, CEMAC)
Implements the RIB mapping for the registered French and Monegasque formats.
National checksum for ISO 7064 MOD 97-10 countries (ME, MK, PT, RS, SI, TL)
Requires canonical national keys, checks all supported Serbian and Slovenian banks and reports unsupported for alphanumeric Macedonian accounts.
National checksum for Netherlands (NL 11-proof, INGB exception)
Uses the TR201 account-number exemption based on three leading zeros.
National checksum for Norway (NO Mod 11)
Uses the ordinary TR201 calculation and reports the separate legacy form as unsupported.
National checksum for Slovakia (SK Mod 11 verify-only)
Applies both Slovak Modulus 11 checks, including the six-digit account prefix.
iban_mistranscription_suggestions($iban) / IBAN::MistranscriptionSuggestions()
Uses an independently written visual-confusion table and returns an empty list for impossible lengths.
iban_countries() / IBAN::Countries()
Includes the 89 registered Release 103 prefixes and omits unofficial codes and unregistered aliases.
iban_country_get_bban_format_swift($code) / IBANCountry::BBANFormatSWIFT()
Uses Release 103 descriptors, including character-class differences for Brazil, Qatar and El Salvador.
iban_country_get_bban_format_regex($code) / IBANCountry::BBANFormatRegex()
Uses Release 103 descriptors, including character-class differences for Brazil, Qatar and El Salvador.
iban_country_get_bban_length($code) / IBANCountry::BBANLength()
Derives BBAN length from the registered IBAN length and returns no row for unregistered prefixes including MA.
iban_country_get_iban_format_swift($code) / IBANCountry::IBANFormatSWIFT()
Uses Release 103 descriptors, including character-class differences for Brazil, Qatar and El Salvador.
iban_country_get_iban_format_regex($code) / IBANCountry::IBANFormatRegex()
Uses Release 103 descriptors, including character-class differences for Brazil, Qatar and El Salvador.
iban_country_get_bankid_start_offset / stop_offset / IBANCountry::BankID*
Uses Release 103 bank ranges as recorded in the offset audit.
iban_country_get_branchid_start_offset / stop_offset / IBANCountry::BranchID*
Uses Release 103 branch ranges and returns None where PHP exposes an inverted or unregistered range.
iban_country_get_nationalchecksum_start_offset / stop_offset / IBANCountry::NationalChecksum*
Reports explicit national check digit ranges and omits implicit checks such as the two Slovak weighted checks.
iban_country_is_sepa($code) / IBANCountry::IsSEPA()
Uses EPC409-09 v8.0 for SEPA status across the supported registry instead of PHP's snapshot.
PHP_IBAN\IBAN
Validated Iban methods operate on their receiver, with immutable repair through the typed API.
PHP_IBAN\IBANCountry
Exposes typed registry records by reference and defers the supplemental getters listed in the first release scope.

Built on

Crates: laravel-rust-iban, laravel-rust-iban-core · Upstream notices

Documentation