I an trying to upload a file with a form,so when I change the validation ryle ‘skipOnEmpty’ from true to false.
Then when I select a file I can not upload it,I have the message Please upload a file,when I set skipOnEmpty true I can upload file.What is wrong?
return [
[['file'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg,doc,pdf,docx,gif'],