diff --git a/src/Validator/CountryValidator.php b/src/Validator/CountryValidator.php index 150c104..7cb0eb6 100644 --- a/src/Validator/CountryValidator.php +++ b/src/Validator/CountryValidator.php @@ -10,14 +10,14 @@ */ class CountryValidator extends AbstractValidator { - const INVALID = 'countryInvalid'; - const COUNTRY_NOT_FOUND = 'countryNotFound'; + const INVALID = 'countryInvalid'; + const COUNTRY_NOT_FOUND = 'countryNotFound'; /** * @var array */ protected $messageTemplates = array( - self::INVALID => 'Invalid type given. String expected', + self::INVALID => 'Invalid type given. String expected', self::COUNTRY_NOT_FOUND => 'Country %value% was not found', ); @@ -73,6 +73,8 @@ public function getLoader() */ public function isValid($value) { + $this->setValue($value); + if ($value instanceof CountryInterface) { return true; }