-
Notifications
You must be signed in to change notification settings - Fork 162
Adds ES doi / nie / cif / nif #121
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
Conversation
@kvesteri how do i compile the docs so i can test them out? I keep getting an error about "sphinx.ext.pngmath" not being found. What version are you using? |
Thanks for the PR. What is the benefit of the Locale class? I would rather use syntax of something like: import validators
validators.fi.business_id('0112038-9')
validators.es.cif('B25162520') rather than having to always initialize a new Locale object. Another problem with the Locale object is that it is easily confused with Bable Locale object. |
@kvesteri I mean the whole idea is to abstract away the whole i18n and make it seamless. The way i envision this is: (this may be a horrible example, but just attempt to get by point across) validators/temperature.py
validators/i18n/us/temperature.py
in your code
Put it simply, the idea is to be able to not need to know the locale in order to use it. Its seamless to the user, the user simply just uses the validator, we do the heavy lifting underneath the covers. If you're concerned with having the name |
I'm just not convinced by either this branch or the example you gave that the having a Locale class would be the way to go. The whole point of this library is to have a collection of immutable functions. I'd prefer not have anything containing a state. |
@kvesteri Hey, this is your repo. You're the benevolent dictator here. I will remove the Locale and leave the rest of the validation code. |
@kvesteri can I remove the |
@kvesteri friendly ping. |
@kvesteri can you let me know when you publish this please? I have a PR over at joke2k/faker#959 that needs a version. Thanks. |
Already released (0.13.0) |
@kvesteri ps. https://validators.readthedocs.io/en/latest/ doc looks old. |
- Adds Locale() to abstract away the region.