lib/europe/vat/format.rb in europe-0.0.16 vs lib/europe/vat/format.rb in europe-0.0.17

- old
+ new

@@ -17,11 +17,10 @@ EE: /^EE\d{9}$/, EL: /^EL\d{9}$/, ES: /^ES([A-Z0-9]\d{7}[A-Z0-9])$/, FI: /^FI\d{8}$/, FR: /^FR[A-Z0-9][A-Z0-9] \d{9}$/, - GB: [/^GB(\d{3} \d{4} \d{2}( \d{3}5)?)$/, /^GB(HA|GD)\d{3}(6|7)$/], HR: /^HR\d{11}$/, HU: /^HU\d{8}$/, IE: /^IE\d[A-Z0-9\+\*|\d]\d{5}([A-Z]|WI)$/, IT: /^IT\d{11}$/, LT: /^LT(\d{9}|\d{12})$/, @@ -44,10 +43,10 @@ match_vat_number(number, country_code) end def self.sanitize_number(number, country_code) - if %i[GB DK FR].include?(country_code) + if %i[DK FR].include?(country_code) number.gsub(/\.|\t/, '').upcase else number.gsub(/\.|\t|\s/, '').upcase end end