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

Incorrect finance Validation Logic · Issue #440 · python-validators/validators · GitHub

Repository navigation

Incorrect finance Validation Logic #440

Description

Incorrect finance Validation Logic (possible bug)

Hi,
while reviewing the finance.py validators (ISIN, CUSIP, SEDOL), I found that the validators contain several issues, and I’d like to confirm whether this is a bug or if I’m missing something.

Reference to my mutation-testing analysis:
Bolest-oci/mutation-testing#35

F.e ISIN

The official ISIN format is two uppercase letters, nine alphanumeric characters, and one check digit (12 characters total).
However, the current validator seems incomplete:

  • The Luhn checksum is implemented incorrectly and never computed.
  • The format is not enforced (first two characters should be uppercase letters, last must be a digit).
  • Lowercase letters and invalid characters are accepted.
  • It does not verify that the first two letters form a country code (optional, but usually expected).

I'm thinking of submitting a PR with a fix, but I'm asking first to make sure I'm not missing something.
Thanks!

Activity

  1. changed the title [-]Incorrect ISIN Validation Logic[/-] [+]Incorrect finance Validation Logic[/+] on Nov 25, 2025
  2. nandgator commented on Mar 9, 2026

    Collaborator

    Hi, thanks for reviewing the code. Please provider references for the claim. PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL