VAT format validation
com2 - January 26, 2009 - 19:28
| Project: | Ubercart VAT Number |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Description
I use a format that correctly validates on the EU website but the module stubbornly responds with:
"Your VAT Number syntax is not correct. You should have something like that : FR0123456789"
Will it only validate French numbers correctly?

#1
I submit a patch to relax the validation and allow apart from the country code other letters. Now Spanish VAT numbers will validate correctly.
#2
#3
Hi,
I'm not sure to understand this issue, normally a VAT number is composed like that:
2 letter country code + List of numbers. The spanish VAT number should be like that too...
The last condition you removed in your patch check if the "code" after the country code is only composed by letters, so, until somebody didn't prove me that there are some VAT number that can have letters in their "code" I suggest to not remove this condition.
#4
I'm not sure that the prefix is mandatory for national invoice in every country.
Neither in italy this is mandatory, but I suppose that the VAT validation process require it.
Understanding that people normally don't use the country prefix I've written a little patch that automatically fill the vat field with the right iso code just selecting the billing country.
This is my really first patch so, if there is something wrong, please be patient.
Maybe the better choice would be to create two fields as in the Vies VAT number validation, one automatically filled with country iso and the other just for digits.
#5
LS,
IMHO the whole validation of the VAT-number is a critical aspect of this module. It should be 'very good' or outstanding, because store owners and customers must be able to rely on it. I checked out the module and I think there is some room for improvement of it. For instance:
I don't only want to be a positive, critical spectator on this, but willing to actively work on this matter. So let me know when hands are needed.
Best,
VinceW
-=[ Your Information Matters ]=-
#6
For many (unlimited) businesses the Spanish VAT registration number is the same as the TAX registration number of the shop owner. Furthermore legally correct invoices (of suppliers and private persons alike) need to have both the tax number of the client and the store, if they hava a VAT registration or not. This means that for all Spanish clients of a Spanish shop the TAX registration number is obligatory, Is there a way to patch this module to cater for this situation (exception)?