Skip to content

Commit

Permalink
Rules method now support multiple arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-bottarini authored May 26, 2021
1 parent 1f3084a commit 852b65e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Http\Requests\UpdateResourceRequest;
use Laravel\Nova\Nova;

use Illuminate\Contracts\Validation\Rule;
use Laravel\Nova\Panel;

class NestedForm extends Field implements RelatableField
Expand Down Expand Up @@ -303,7 +303,7 @@ public function min(int $min)
*/
public function rules($rules)
{
parent::rules($rules);
parent::rules(($rules instanceof Rule || is_string($rules)) ? func_get_args() : $rules);

return $this->returnContext;
}
Expand Down

0 comments on commit 852b65e

Please sign in to comment.