-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Validating an empty string as a VAT no. returns true #1010
Comments
I think this was totally on purpose to support creating accounts without a VAT number but forcing a valid one if given. That is a very typical use case when you are still prospecting. |
You're not wrong, but I do think we're taking a wrong approach. I wanted to re-use this function in a module I created to see if the VAT no. was correct. But I had to manually re-check the field for presence of any string at all. I think the functionality should be split over two logical functions:
|
that sounds reasonable to me. go ahead I will accept it |
Absolutely. We have LOTS of clients who do not have a VAT number. Enforcing this would be dire for us. |
corebos/include/validation/Validations.php
Lines 72 to 74 in 3a8a2fc
I think this is fundamentally wrong. We essentially say that an empty string is a valid EU VAT no., which it most definitely is not.
The text was updated successfully, but these errors were encountered: