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

Person Validaton Accept VAT value #9

Open
fabianobonomini opened this issue Dec 7, 2021 · 3 comments
Open

Person Validaton Accept VAT value #9

fabianobonomini opened this issue Dec 7, 2021 · 3 comments

Comments

@fabianobonomini
Copy link

Inside the page http://localhost/it/account/address-book/3/edit

as a Person If I try to fill the sylius_address_taxCode with a vat number the validation accepts the data.

I expected that the taxCode was validated from the plugin. Mabye I am missing something?

Best Regards
Fabiano

@mmenozzi
Copy link
Member

mmenozzi commented Dec 7, 2021

Hi @fabianobonomini, validation depends also on the selected country. Make sure to select Italy as country. Then the tax code should accept only valid Italian tax code (codice fiscale) and not VAT numbers (partita IVA).

@fabianobonomini
Copy link
Author

fabianobonomini commented Dec 7, 2021 via email

@mmenozzi
Copy link
Member

mmenozzi commented Dec 7, 2021

Sorry @fabianobonomini, you're right and I was wrong. After looking at the code I remembered that we did it intentionally to not introduce too much complexity.

Yes it's true, individual Italian tax code should not accept VAT numbers (but it should for companies) btw we chose to not enforce this validation to keep it simple.

Anyway if you want provide a PR for that we'll be glad to review and merge it.

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

2 participants