FileUpload validation not working

Hey, I have a wizard set up with skippable steps, in one of the steps i have a FileUpload component which has minFiles(1). When I fill out the form I am able to save without a file added and no validation errors throw. I've tried making the wizard not skippable but that didn't work, I have tried required() and the asterisk shows but again I can save without any validation errors throwing. I have also tried custom rules and using beforeValidation on the wizard step but neither worked either. This is my code:
Components\FileUpload::make('uploads')
->disk('assets')
->acceptedFileTypes(['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/jpeg', 'image/png'])
->multiple()
->downloadable()
->storeFileNamesIn('uploads')
->directory('uploads')
->minFiles(1),
Components\FileUpload::make('uploads')
->disk('assets')
->acceptedFileTypes(['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'image/jpeg', 'image/png'])
->multiple()
->downloadable()
->storeFileNamesIn('uploads')
->directory('uploads')
->minFiles(1),
2 Replies
Matthew
Matthew3w ago
I was about to make a similar post. My validations are also not working. For some reason, the max upload size is always 12MB, even if you change the values in the php.ini file
garethfrost
garethfrostOP3w ago
it very wierd because its the only field in my wizard that the validation isnt working for
Want results from more Discord servers?
Add your server