Laravel 5 - image validation does'nt work -


i using laravel 5 validator validating avatars, rules this:

$validator = validator::make(     request::all(),     [         'avatar' => 'required|image|max:1000'     ] ); 

i trying upload files , says "no file choosen". if remove required rule, works, max:1000 rule work.

make sure form accept files,

form::open(array('url' => 'foo/bar', 'files' => true)) 

or

<form action="foo/bar" enctype="multipart/form-data"> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -