-
Notifications
You must be signed in to change notification settings - Fork 81
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
Correct regex for IE VAT numbers #24
Conversation
According to http://www.hmrc.gov.uk/vat/managing/international/esl/country-codes.htm VAT numbers for Ireland have the following format (where "X" is [A-Z]): 1234567X 1X23456X 1234567XX (8 or 9 characters)
Hi Brian, thank you for the fix and the source you provided. Seems valid, even if i am not able to find any other sources that mention this third syntax. Did you see any irish vat number with this syntax "in the wild"? I just merged it in, but wait for your answer before releasing it. Thx again! |
@yolk - no, not in the wild, but I was porting my company's VAT validation process from an internally built Perl module to use your ruby module and while porting the test cases, I found this one discrepancy. The page I referenced seemed to back up the test case (and it seemed official). Also, I just found that the VIES FAQ seems to agree with the proposed change as well (although it's not as clear as I wish it were). |
@brianphillips Okay, thats sounds valid. I'll release the changes within the next days. Thx again! |
I recently came across this issues with irish VAT validation in valvat as well after one of our irish customers reported his VAT is marked as invalid. So I can confirm that I've seen the third syntax in the wild. |
Hi Laura, |
Yes, initially I had some dependency incompatibilities for updating valvat along with other gems we are using, but now everything works great |
Let me take a guess: Nokogiri? Had the same issue, sadly savon depends on version 1.5.x for this gem to keep it compatible with ruby 1.8.7. But I think the next version of savon will fix this: savonrb/savon#487 |
Yes, indeed :-) On Thu, Sep 12, 2013 at 4:34 PM, Sebastian Munz [email protected]:
|
According to http://www.hmrc.gov.uk/vat/managing/international/esl/country-codes.htm VAT numbers for Ireland have the following format (where "X" is [A-Z]):
1234567X
1X23456X
1234567XX
(8 or 9 characters)
The proposed change allows for an optional, penultimate alpha character.