diff --git a/pydantic_extra_types/isbn.py b/pydantic_extra_types/isbn.py index 81b3648b..df573c68 100644 --- a/pydantic_extra_types/isbn.py +++ b/pydantic_extra_types/isbn.py @@ -123,7 +123,7 @@ def validate_isbn_format(value: str) -> None: if isbn10_digit_calc(value) != value[-1]: raise PydanticCustomError('isbn_invalid_digit_check_isbn10', 'Provided digit is invalid for given ISBN') - elif isbn_length == 13: + if isbn_length == 13: if not value.isdigit(): raise PydanticCustomError('isbn13_invalid_characters', 'All digits of ISBN-13 must be integers') if value[:3] not in ('978', '979'):