kdion4891 / laravel-livewire-forms

A dynamic, responsive Laravel Livewire form component with realtime validation, file uploads, array fields, and more.
243 stars 54 forks source link

Field file with rules is always required nullable not working #12

Open t-prod opened 4 years ago

t-prod commented 4 years ago

Hi,

I have a form with several files with rules like this :

Field::make('Catalogue EN', 'catalog_file_en')->file()->rules('nullable|required_with:catalog_label_en|mimes:pdf,xls,xlsx'), Field::make('Libellé catalogue EN', 'catalog_label_en')->input()->rules('nullable|required_with:catalog_file_en'),

I have always the validation rule if I choose nothing for these fields. How can I do ?

Regards