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);
    }
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);
    }
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 ) ; }
Validates model's data.

@param Model $model
@param Validation\Rules|Eloquent\ModelAccess $rules
@param string $type
Validates model s data .