We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66caa98 commit 3a0433fCopy full SHA for 3a0433f
pydantic_extra_types/payment.py
@@ -147,7 +147,7 @@ def validate_brand(card_number: str) -> PaymentCardBrand:
147
if card_number[0] == '4':
148
brand = PaymentCardBrand.visa
149
required_length = [13, 16, 19]
150
- elif 51 <= int(card_number[:2]) <= 55:
+ elif (51 <= int(card_number[:2]) <= 55) or (2221 <= int(card_number[:4]) <= 2720):
151
brand = PaymentCardBrand.mastercard
152
required_length = [16]
153
elif card_number[:2] in {'34', '37'}:
0 commit comments