schwifty/iban.py
I have a IBAN starting Sk22..., first 2 letters should be capital so it is invalid IBAN, but when I call validation on it it passes as valid.
When i tried the regex from _validate_characters function it is working fine so i suspect that self in the method doesn't return string of IBAN.
When I run just this function it returns None and so does just the regex from this function. But I am expecting exception.
def _validate_characters(self) -> None:
if not re.match(r"[A-Z]{2}\d{2}[A-Z]*", self):
raise exceptions.InvalidStructure(f"Invalid characters in IBAN {self!s}")
schwifty/iban.pyI have a IBAN starting Sk22..., first 2 letters should be capital so it is invalid IBAN, but when I call validation on it it passes as valid.
When i tried the regex from _validate_characters function it is working fine so i suspect that self in the method doesn't return string of IBAN.
When I run just this function it returns None and so does just the regex from this function. But I am expecting exception.