Skip to content

Add country validation for BIC #482

@LuukGubbels

Description

@LuukGubbels

Currently, when validating an IBAN a check is ran to see if the country code is valid.

This is not done for BIC and leads to faulty behaviour. When executing

stdnum.bic.is_valid("MULTIPLE")

the function will return True, since the string matches the regex ^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$.
In this string "IP" should be the country code, but this does not exist and hence the is_valid function should return False instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions