public function path(array $values, $operator)
    {
        if (!in_array($operator, array('=', '!='))) {
            return $this->translation->text('Unsupported operator');
        }

        foreach ($values as $pattern) {
            if (!gplcart_string_is_regexp($pattern)) {
                return $this->translation->text('@field has invalid value', array(
                    '@field' => $this->translation->text('Condition')));
            }
        }

        return true;
    }
public function path(array $values, $operator)
    {
        if (!in_array($operator, array('=', '!='))) {
            return $this->translation->text('Unsupported operator');
        }

        foreach ($values as $pattern) {
            if (!gplcart_string_is_regexp($pattern)) {
                return $this->translation->text('@field has invalid value', array(
                    '@field' => $this->translation->text('Condition')));
            }
        }

        return true;
    }
public function path ( array $ values , $ operator ) { if ( ! in_array ( $ operator , array ( '=' , '!=' ) ) ) { return $ this -> translation -> text ( 'Unsupported operator' ) ; } foreach ( $ values as $ pattern ) { if ( ! gplcart_string_is_regexp ( $ pattern ) ) { return $ this -> translation -> text ( '@field has invalid value' , array ( '@field' => $ this -> translation -> text ( 'Condition' ) ) ) ; } } return true ; }
Validates the path pattern
@param array $values
@param string $operator
@return boolean|string
Validates the path pattern