File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ class Validator
22
22
'DK ' => '(\d{2} ?){3}\d{2} ' ,
23
23
'EE ' => '\d{9} ' ,
24
24
'EL ' => '\d{9} ' ,
25
- 'ES ' => '(?: [A-Z]\d{7}[A-Z]|\d{8}[A-Z]|[A-Z]\d{8}) ' ,
25
+ 'ES ' => '([A-Z]\d{7}[A-Z]|\d{8}[A-Z]|[A-Z]\d{8}) ' ,
26
26
'FI ' => '\d{8} ' ,
27
27
'FR ' => '[A-Z\d]{2}\d{9} ' ,
28
- 'GB ' => '\d{9}|\d{12}|(GD|HA)\d{3} ' ,
28
+ 'GB ' => '( \d{9}|\d{12}|(GD|HA)\d{3}) ' ,
29
29
'HR ' => '\d{11} ' ,
30
30
'HU ' => '\d{8} ' ,
31
- 'IE ' => '[A-Z\d]{8}|[A-Z\d]{9} ' ,
31
+ 'IE ' => '( [A-Z\d]{8}|[A-Z\d]{9}) ' ,
32
32
'IT ' => '\d{11} ' ,
33
33
'LT ' => '(\d{9}|\d{12}) ' ,
34
34
'LU ' => '\d{8} ' ,
@@ -106,8 +106,7 @@ public function validateVatNumberFormat(string $vatNumber) : bool
106
106
return false ;
107
107
}
108
108
109
- $ matches = preg_match ('/^ ' . $ this ->patterns [$ country ] . '$/ ' , $ number ) > 0 ;
110
- return $ matches ;
109
+ return preg_match ('/^ ' . $ this ->patterns [$ country ] . '$/ ' , $ number ) > 0 ;
111
110
}
112
111
113
112
/**
You can’t perform that action at this time.
0 commit comments