src/ZipCode/Validator.php
public function validate($a_country_iso_code, $a_zip_code)
    {
        if ($this->notHavePatternToValidateZipCodeForThisCountry($a_country_iso_code))
        {
            throw new \InvalidArgumentException(
                'Not have pattern to validate "' . $a_country_iso_code . '" zip codes, or "' . $a_country_iso_code . '" is not a valid ISO 3166-1 CODE '
            );
        }
        $pattern = $this->getPatternToValidateZipCodeForThisCountry($a_country_iso_code);

        return (bool) preg_match("/^{$pattern}$/i", $a_zip_code);
    }
public function validate($a_country_iso_code, $a_zip_code)
    {
        if ($this->notHavePatternToValidateZipCodeForThisCountry($a_country_iso_code))
        {
            throw new \InvalidArgumentException(
                'Not have pattern to validate "' . $a_country_iso_code . '" zip codes, or "' . $a_country_iso_code . '" is not a valid ISO 3166-1 CODE '
            );
        }
        $pattern = $this->getPatternToValidateZipCodeForThisCountry($a_country_iso_code);

        return (bool) preg_match("/^{$pattern}$/i", $a_zip_code);
    }
@param string $a_country_iso_code
@param string $a_zip_code

@return bool