FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Mir card validation support by TheDrunkenBear · Pull Request #420 · python-validators/validators · GitHub

Repository navigation

Add Mir card validation support - #420

Merged
nandgator merged 8 commits into
python-validators:masterfrom
TheDrunkenBear:validate_mir_cards
Apr 26, 2025
Merged

nandgator merged 8 commits into
python-validators:masterfrom
TheDrunkenBear:validate_mir_cards

Conversation

TheDrunkenBear commented Apr 2, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

This PR introduces validation for Mir cards (Russian payment system) to the validators library.

Key Changes:

  • Added mir() validator function with BIN checks (2200-2204)
  • Ensures compliance with Luhn algorithm
  • Includes length validation (16 digits standard)
  • Added unit tests for valid/invalid cases

Why This Matters:

  • Mir is a nationally critical payment system (used in Russia and neighboring countries)
  • Required for apps processing payments in RUB
  • Maintains parity with other card validators (Visa, Mastercard, Unionpay etc.)

Copy link
Copy Markdown
Contributor Author

cmd:

python -m ruff check --fix .

nandgator force-pushed the validate_mir_cards branch from f4d74c6 to cfdb7b6 Compare April 26, 2025 16:36
nandgator merged commit bafe62e into python-validators:master Apr 26, 2025

Copy link
Copy Markdown
Collaborator

Thanks @TheDrunkenBear!

TheDrunkenBear deleted the validate_mir_cards branch April 27, 2025 09:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL