Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 26, 2025

Conversation

MaurizioPilia
Copy link
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! 🚀

@yozachar
Copy link
Collaborator

Could you please provide some references?

@MaurizioPilia
Copy link
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!

("12345",),
("X0000000T",),
("00000000T",),
("00000001R",),
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@yozachar yozachar added Breaking Changes Issue/PR: Breaking changes and removed Breaking Changes Issue/PR: Breaking changes labels Mar 29, 2025
@MaurizioPilia MaurizioPilia requested a review from yozachar 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.
@yozachar
Copy link
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.htmlhttps://www.letranif.com/?num=00000000&ok=okhttps://www.validardni.es/

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

Thanks @MaurizioPilia!

@yozachar yozachar merged commit 7c97eca into python-validators:master Apr 26, 2025
17 checks passed
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