protected function setError($key, $error)
    {
        gplcart_array_set($this->errors, $this->getKeyPath($key), $error);
        return $this->errors;
    }
protected function setError($key, $error)
    {
        gplcart_array_set($this->errors, $this->getKeyPath($key), $error);
        return $this->errors;
    }
protected function setError ( $ key , $ error ) { gplcart_array_set ( $ this -> errors , $ this -> getKeyPath ( $ key ) , $ error ) ; return $ this -> errors ; }
Sets a validation error
@param string|array $key
@param string $error
@return array
Sets a validation error