protected function validate(Model $model) { $attributes = $model->attributesToArray(); $checkable = $model->getCheckable(); if ($checkable === null) { return; } $result = $checkable->check($attributes); if ($result->failed()) { throw new FailedCheckException($checkable, $result); } }