Skip to content

Commit

Permalink
Fixed GB and IN rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ToX82 committed Jun 20, 2022
1 parent 1c87683 commit f24eb95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VatNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public static function check(string $country, string $code): bool
// 9 characters. Includes one or two alphabetical characters (first or last or first and last).
return self::_checkLength($code, 9, 9) && self::_checkSpain($code);
case "GB":
// 9 digits.
return self::_checkLength($code, 9, 9) && self::_numbersOnly($code);
// 9 to 12 digits.
return self::_checkLength($code, 9, 12) && self::_numbersOnly($code);
case "HU":
// 8 or 9 digits.
return self::_checkLength($code, 8, 8) && self::_numbersOnly($code);
Expand All @@ -99,7 +99,7 @@ public static function check(string $country, string $code): bool
return self::_checkLength($code, 9, 9) && self::_numbersOnly($code);
case "IN":
// 15 digits.
return self::_checkLength($code, 15, 15) && self::_numbersOnly($code);
return self::_checkLength($code, 15, 15);
case "IS":
// 5 or 6 characters.
return self::_checkLength($code, 5, 6);
Expand Down

0 comments on commit f24eb95

Please sign in to comment.