validators.iban

IBAN.

@validator
def iban(value: str, /):

Return whether or not given value is a valid IBAN code.

Examples:
>>> iban('DE29100500001061045672')
True
>>> iban('123456')
ValidationError(func=iban, args={'value': '123456'})
Arguments:
  • value: IBAN string to validate.
Returns:

(Literal[True]): If value is a valid IBAN code. (ValidationError): If value is an invalid IBAN code.