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

Fix: Allow Special DOI Cases Used in Public Administration Tests by MaurizioPilia · Pull Request #415 · python-validators/validators · GitHub

Repository navigation

Fix: Allow Special DOI Cases Used in Public Administration Tests - #415

Merged
nandgator merged 4 commits into
python-validators:masterfrom
MaurizioPilia:patch-1
Apr 26, 2025
Merged

nandgator merged 4 commits into
python-validators:masterfrom
MaurizioPilia:patch-1

Conversation

Copy link
Copy Markdown
Contributor

The validation previously excluded certain DOI codes that are actually valid and commonly used in test environments by public administration entities. These codes, although not assigned to real individuals, should be considered valid for all practical purposes.

This change ensures that the validation logic aligns with real-world usage, preventing false negatives when handling official test scenarios.

Let me know if any adjustments are needed! 🚀

Copy link
Copy Markdown
Collaborator

Could you please provide some references?

Copy link
Copy Markdown
Contributor Author

Hi! According to the official government website where the control digit calculation is explained, there is no mention of any specific DOIs being considered invalid.

Moreover, the DOIs that were previously excluded are validated correctly in the most commonly used public tools:
• https://testingdatagenerator.com/doi.html
• https://www.letranif.com/?num=00000000&ok=ok
• https://www.validardni.es/

Therefore, it seems clear that these codes should not be excluded in the validation. Thank you for reviewing!

Comment thread tests/i18n/test_es.py
("12345",),
("X0000000T",),
("00000000T",),
("00000001R",),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If these are valid, can you please put them in the valid nif test cases?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done

nandgator added Breaking Changes Issue/PR: Breaking changes and removed Breaking Changes Issue/PR: Breaking changes labels Mar 29, 2025
MaurizioPilia requested a review from nandgator April 9, 2025 10:55
MaurizioPilia and others added 4 commits April 26, 2025 21:57
The special cases excluded from the validation represent valid codes, used in test environments.

Copy link
Copy Markdown
Collaborator

Hi! According to the official government website where the control digit calculation is explained, there is no mention of any specific DOIs being considered invalid.

Moreover, the DOIs that were previously excluded are validated correctly in the most commonly used public tools: • https://testingdatagenerator.com/doi.html • https://www.letranif.com/?num=00000000&ok=ok • https://www.validardni.es/

Therefore, it seems clear that these codes should not be excluded in the validation. Thank you for reviewing!

Thanks @MaurizioPilia!

nandgator merged commit 7c97eca into python-validators:master Apr 26, 2025
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