From 852b65e01481e79cb28351515f097fc5c7ff6ab6 Mon Sep 17 00:00:00 2001 From: Alberto Date: Wed, 26 May 2021 16:40:19 +0200 Subject: [PATCH] Rules method now support multiple arguments --- src/NestedForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NestedForm.php b/src/NestedForm.php index 31942e2..3639531 100644 --- a/src/NestedForm.php +++ b/src/NestedForm.php @@ -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 @@ -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; }