FluxBB\Core\Validator::ensureValid PHP Method

ensureValid() protected method

Throws an exception if validation fails.
protected ensureValid ( array $attributes )
$attributes array
    protected function ensureValid(array $attributes)
    {
        $validation = $this->validation->make($attributes, $this->rules());
        if ($validation->fails()) {
            throw new ValidationFailed($validation->getMessageBag());
        }
        return $this;
    }