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

Replace vat custom validation with python-stdnum #375

Open
johnraz opened this issue May 31, 2019 · 5 comments
Open

Replace vat custom validation with python-stdnum #375

johnraz opened this issue May 31, 2019 · 5 comments

Comments

@johnraz
Copy link

johnraz commented May 31, 2019

Hello there,

As a followup to #210 and more recently #370,

I would like to know if you'd be taking a PR that would replace the current VAT validation with the one coming from python-stdnum?

I think it would also probably allow some more options in the clean function to allow for example a compact version of the number to be stored.
Nothing too fancy here, just something like a compact boolean attribute to the field init.

Let me know how you feel about this and thanks already for your time 😉

/cc @claudep @benkonrath

@claudep
Copy link
Member

claudep commented Jun 3, 2019

At first sight, I would say yes, go for it. I didn't check the code, though.

@benkonrath
Copy link
Member

I also think it's a good idea.

If or when I can find some extra time, I'd like to experiment with making a separate django-stdnum package that is a simple generated wrapper for python-stdnum with the goal of deprecating parts of django-localfavor. It just doesn't make sense to me that we keep maintaining custom validation code when there's a high quality library like python-stdnum available. In the meantime, I think it's worth replacing our implementations with stdnum when there's a benefit.

@codingjoe Do you have any thoughts on this?

@codingjoe
Copy link
Contributor

Ff stdnum is the best library around, go for it.

@johnraz
Copy link
Author

johnraz commented Jul 10, 2019

Quick feedback on this issue, the project I was working on and that required this change has been put on hold for now. I'm still considering to contribute but it may take longer than expected.

@carltongibson
Copy link
Member

carltongibson commented Jul 3, 2021

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

No branches or pull requests

5 participants