Skip to content

Commit

Permalink
Check if given country is in Europe, bail early otherwise.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Apr 9, 2016
1 parent ed31be2 commit d8a53e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public function check( $vatNumber, $countryCode = '' ) {
$vatNumber = substr( $vatNumber, 2 );
}

// check if country is in EU, bail early otherwise.
if( ! $this->isEuCountry( $countryCode ) ) {
return false;
}
try {
$response = $this->client->checkVat(
array(
Expand Down

0 comments on commit d8a53e0

Please sign in to comment.