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

@@ -8,7 +8,7 @@ defmodule IbanEx.Formatter do
@type iban() :: IbanEx.Iban.t()
@type available_format() :: :compact | :pretty | :splitted
@type available_formats_list() :: [:compact | :pretty | :splitted ]
@type available_formats_list() :: [:compact | :pretty | :splitted]
@spec available_formats() :: available_formats_list()
def available_formats(), do: @available_formats
@@ -25,6 +25,7 @@ def splitted(iban), do: format(iban, :splitted)
@spec format(iban()) :: String.t()
@spec format(iban(), available_format()) :: String.t()
def format(iban, format \\ :compact)
def format(iban, :compact),
do: format(iban, :pretty) |> normalize()