I have some problems with Laravel Validator. I'm sending some images as an array, and it's validating images even if they are empty, but they are not required, it always says that The images must be an image, and The images must be a file of type: jpg, png, jpeg, gif, svg. I have specified that images are array and nullable, but still have this problem. Here is my validation for images.
'images*' => 'array|nullable|image|mimes:jpg,png,jpeg,gif,svg',
Any ideas how to fix it?
undefined
could be converted to a string, which is not a valid image). - Lorenzo S