Skip to content

Commit

Permalink
Merge pull request #664 from cosmastech/fix/base-form-request-rules-a…
Browse files Browse the repository at this point in the history
…re-optional

`rules()` are optional for GetFromFormRequestBase
  • Loading branch information
shalvah authored May 10, 2023
2 parents 23f0553 + 3f7a602 commit 632a17b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Extracting/Strategies/GetFromFormRequestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ protected function getRouteValidationRules($formRequest)

return call_user_func_array([$formRequest, 'validator'], [$validationFactory])
->getRules();
} else {
} elseif (method_exists($formRequest, 'rules')) {
return call_user_func_array([$formRequest, 'rules'], []);
}

return [];
}

/**
Expand Down

0 comments on commit 632a17b

Please sign in to comment.