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

Correct regex for IE VAT numbers #24

Merged
merged 1 commit into from
Jul 31, 2013
Merged

Conversation

brianphillips
Copy link
Contributor

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.

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)
yolk added a commit that referenced this pull request Jul 31, 2013
Correct regex for IE VAT numbers
@yolk yolk merged commit 51a2deb into yolk:master Jul 31, 2013
@yolk
Copy link
Owner

yolk commented Jul 31, 2013

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!

@brianphillips
Copy link
Contributor Author

@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).

@yolk
Copy link
Owner

yolk commented Aug 1, 2013

@brianphillips Okay, thats sounds valid. I'll release the changes within the next days.

Thx again!

@bulinutza
Copy link

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.

@yolk
Copy link
Owner

yolk commented Sep 12, 2013

Hi Laura,
thanks for letting me know! Hope the release of valvat 0.6 fixed this for you!?

@bulinutza
Copy link

Yes, initially I had some dependency incompatibilities for updating valvat along with other gems we are using, but now everything works great

@yolk
Copy link
Owner

yolk commented Sep 12, 2013

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

@bulinutza
Copy link

Yes, indeed :-)

On Thu, Sep 12, 2013 at 4:34 PM, Sebastian Munz [email protected]:

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#487savonrb/savon#487


Reply to this email directly or view it on GitHubhttps://github.com//pull/24#issuecomment-24324814
.

@brianphillips brianphillips deleted the patch-1 branch September 12, 2013 15:00
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

Successfully merging this pull request may close these issues.

3 participants