ADD IBAN FIELD TO STRUCTS AND UPDATE PARSING LOGIC

- Added `iban` field to the `IbanEx.Iban` struct to hold the full IBAN value. - Updated the parsing logic to populate
the new field. - Adjusted BBAN rules and tests for France and Brazil to reflect updated structures. - Improved error
handling and format validation routines.
This commit is contained in:
2025-11-30 11:04:09 -05:00
parent d197a86454
commit 763e1dba0c
21 changed files with 156 additions and 76 deletions

View File

@@ -27,7 +27,7 @@ defmodule IbanEx.Error do
:invalid_account_number,
:invalid_branch_code,
:invalid_national_check
]
]
@messages [
unsupported_country_code: "Unsupported country code",
@@ -40,8 +40,8 @@ defmodule IbanEx.Error do
invalid_bank_code: "Bank code violates required format",
invalid_account_number: "Account number violates required format",
invalid_branch_code: "Branch code violates required format",
invalid_national_check: "National check symbols violates required format",
]
invalid_national_check: "National check symbols violates required format"
]
@spec message(error()) :: String.t()
def message(error) when error in @errors, do: @messages[error]