Skip to content
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

Validator russian individual tax number #408

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

tabbols95
Copy link

This Merge Request proposes the implementation of a validation feature for the Russian Individual Taxpayer Identification Number (INN). This enhancement aims to improve the quality of user-entered data and prevent errors associated with incorrect INNs.

@yozachar
Copy link
Collaborator

Hi @tabbols95, thanks for the contribution. Country specific validations must go under src/validators/i18n/

Please add test cases as well.

@tabbols95
Copy link
Author

Hi @yozachar, thank you for your feedback. I have moved the changes to the i18n directory and added tests. All tests passed successfully.
Thank you for the library. I use it very actively in my work.

Best regards, Alexander.

src/validators/i18n/inn.py Outdated Show resolved Hide resolved
tests/i18n/test_inn.py Outdated Show resolved Hide resolved
src/validators/i18n/__init__.py Outdated Show resolved Hide resolved
@tabbols95
Copy link
Author

Done

@@ -0,0 +1,53 @@
"""Inn."""

from src.validators.utils import validator
Copy link
Collaborator

Choose a reason for hiding this comment

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

Import directly from validators, everywhere:

from validators.utils import validator

(Literal[True]): If `value` is a valid russian individual tax number.
(ValidationError): If `value` is an invalid russian individual tax number.

Returns:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Format your files. Double check your docstrings. Refer other modules.

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