Skip to content

Commit

Permalink
Set up default config for uk postcode validation
Browse files Browse the repository at this point in the history
  • Loading branch information
SteJaySulli committed Oct 13, 2020
1 parent f7484b7 commit cee12a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function validate(): void

switch ($this->country->isoCodeAlpha3) {
case 'GBR':
if (config('addresses.uk_postcode_check.enabled') && !Validator::validatePostcode($this->postcode)) {
if (config('addresses.gbr-validation.enabled') && !Validator::validatePostcode($this->postcode)) {
throw new InvalidUKPostcodeException();
}
break;
Expand Down
3 changes: 3 additions & 0 deletions src/config/addresses.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

return [
'gbr-validation' => [
'enabled' => true
],
'geocoding' => [
'enabled' => true,
'google-maps' => [
Expand Down

0 comments on commit cee12a4

Please sign in to comment.