I am using Laravel 5 Validator for validating avatars, my rules look like this:
$validator = Validator::make(
Request::all(),
[
'avatar' => 'required|image|max:1000'
]
);
I am trying to upload files and it always says "no file choosen". If I remove the required rule, then it works, even the max:1000 rule work.
make sure that form accept files,
Form::open(array('url' => 'foo/bar', 'files' => true))
or
<form action="foo/bar" enctype="multipart/form-data">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With