Routing Numbers
The pydantic_extra_types.routing_number
module provides the
ABARoutingNumber
data type.
ABARoutingNumber ¶
ABARoutingNumber(routing_number: str)
Bases: str
The ABARoutingNumber
data type is a string of 9 digits representing an ABA routing transit number.
The algorithm used to validate the routing number is described in the ABA routing transit number Wikipedia article.
from pydantic import BaseModel
from pydantic_extra_types.routing_number import ABARoutingNumber
class BankAccount(BaseModel):
routing_number: ABARoutingNumber
account = BankAccount(routing_number='122105155')
print(account)
#> routing_number='122105155'
Source code in .venv/lib/python3.10/site-packages/pydantic_extra_types/routing_number.py
37 38 39 |
|