public function countryCode(array $values)
    {
        $existing = array_filter($values, function ($code) {
            $country = $this->country->get($code);
            return isset($country['code']);
        });

        if (count($values) != count($existing)) {
            return $this->translation->text('@name is unavailable', array(
                '@name' => $this->translation->text('Country')));
        }

        return true;
    }
public function countryCode(array $values)
    {
        $existing = array_filter($values, function ($code) {
            $country = $this->country->get($code);
            return isset($country['code']);
        });

        if (count($values) != count($existing)) {
            return $this->translation->text('@name is unavailable', array(
                '@name' => $this->translation->text('Country')));
        }

        return true;
    }
public function countryCode ( array $ values ) { $ existing = array_filter ( $ values , function ( $ code ) { $ country = $ this -> country -> get ( $ code ) ; return isset ( $ country [ 'code' ] ) ; } ) ; if ( count ( $ values ) != count ( $ existing ) ) { return $ this -> translation -> text ( '@name is unavailable' , array ( '@name' => $ this -> translation -> text ( 'Country' ) ) ) ; } return true ; }
Validates the country code condition
@param array $values
@return boolean|string
Validates the country code condition