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; }