protected function ensureValid(array $attributes)
    {
        $validation = $this->validation->make($attributes, $this->rules());

        if ($validation->fails()) {
            throw new ValidationFailed($validation->getMessageBag());
        }

        return $this;
    }
protected function ensureValid(array $attributes)
    {
        $validation = $this->validation->make($attributes, $this->rules());

        if ($validation->fails()) {
            throw new ValidationFailed($validation->getMessageBag());
        }

        return $this;
    }
protected function ensureValid ( array $ attributes ) { $ validation = $ this -> validation -> make ( $ attributes , $ this -> rules ( ) ) ; if ( $ validation -> fails ( ) ) { throw new ValidationFailed ( $ validation -> getMessageBag ( ) ) ; } return $ this ; }
Make sure the given attributes comply to our rules.

Throws an exception if validation fails.

@param array $attributes
@return $this
@throws \FluxBB\Server\Exception\ValidationFailed
Make sure the given attributes comply to our rules .