iban-ex/lib/iban_ex/country/bh.ex

26 lines
564 B
Elixir
Raw Permalink Normal View History

2024-05-14 23:15:55 +00:00
defmodule IbanEx.Country.BH do
@moduledoc """
Bahrain IBAN parsing rules
## Examples
```elixir
iex> %IbanEx.Iban{
...> country_code: "BH",
...> check_digits: "67",
...> bank_code: "BMAG",
...> branch_code: nil,
...> national_check: nil,
...> account_number: "00001299123456"
...> }
...> |> IbanEx.Country.BH.to_string()
"BH 67 BMAG 00001299123456"
```
"""
@size 22
@rule ~r/^(?<bank_code>[A-Z]{4})(?<account_number>[0-9]{14})$/i
use IbanEx.Country.Template
end