protected function isRequiredUnless($value, $parameters)
    {
        $this->requireParameterCount(2, $parameters, 'required_unless');

        $data = Arr::get($this->data, $parameters[0]);

        $values = array_slice($parameters, 1);

        if (!in_array($data, $values)) {
            return $this->isRequired($value);
        }

        return true;
    }
protected function isRequiredUnless($value, $parameters)
    {
        $this->requireParameterCount(2, $parameters, 'required_unless');

        $data = Arr::get($this->data, $parameters[0]);

        $values = array_slice($parameters, 1);

        if (!in_array($data, $values)) {
            return $this->isRequired($value);
        }

        return true;
    }
protected function isRequiredUnless ( $ value , $ parameters ) { $ this -> requireParameterCount ( 2 , $ parameters , 'required_unless' ) ; $ data = Arr :: get ( $ this -> data , $ parameters [ 0 ] ) ; $ values = array_slice ( $ parameters , 1 ) ; if ( ! in_array ( $ data , $ values ) ) { return $ this -> isRequired ( $ value ) ; } return true ; }
Validate that an attribute exists when another attribute does not have a given value.

@param  mixed $value
@param  mixed $parameters

@return bool
Validate that an attribute exists when another attribute does not have a given value .