diff --git a/src/Components/Modals/CuratorPanel.php b/src/Components/Modals/CuratorPanel.php index 26e0ae3..5cb964d 100644 --- a/src/Components/Modals/CuratorPanel.php +++ b/src/Components/Modals/CuratorPanel.php @@ -21,6 +21,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Storage; +use Illuminate\Support\Str; use Livewire\Attributes\On; use Livewire\Component; use Livewire\WithPagination; @@ -138,6 +139,12 @@ public function openModal(string $id, array $settings = []): void public function form(Form $form): Form { + if ($this->maxItems) { + $this->validationRules = array_filter($this->validationRules, function ($value) { + if ($value === 'array' || str_starts_with($value, 'max:')) { return false; } + }); + } + return $form ->schema([ Uploader::make('files_to_add')