Skip to content

Commit

Permalink
Merge pull request #5 from opsidao/patch-1
Browse files Browse the repository at this point in the history
Fix wrong regexp for Belgium numbers
  • Loading branch information
yolk committed Apr 10, 2012
2 parents 4ff19d8 + 55843d7 commit 3f5c7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/valvat/syntax.rb
Expand Up @@ -5,7 +5,7 @@ module Syntax

VAT_PATTERNS = {
'AT' => /\AATU[0-9]{8}\Z/, # Austria
'BE' => /\ABE[0-9]{10}\Z/, # Belgium
'BE' => /\ABE0[0-9]{9}\Z/, # Belgium
'BG' => /\ABG[0-9]{9,10}\Z/, # Bulgaria
'CY' => /\ACY[0-9]{8}[A-Z]\Z/, # Cyprus
'CZ' => /\ACZ[0-9]{8,10}\Z/, # Czech Republic
Expand Down
1 change: 1 addition & 0 deletions spec/valvat/syntax_spec.rb
Expand Up @@ -24,6 +24,7 @@
Valvat::Syntax.validate("BE081733199").should eql(false)
Valvat::Syntax.validate("BE08173319944").should eql(false)
Valvat::Syntax.validate("BE081733199H").should eql(false)
Valvat::Syntax.validate("BE1817331999").should eql(false)
end

it "validates a BG vat number" do
Expand Down

0 comments on commit 3f5c7e7

Please sign in to comment.