public function validateModel(Model $model, Validation\Rules $rules, string $type = null)
    {
        try {
            $this->setModel($rules, $model);
        } catch (\TypeError $e) {
        }

        $this->validate($model->getAttributes(), $rules, $type);
    }