在laravel 4中验证输入文件图像数组

I have a form like this that can have multiples images[] field:

{{ Form::open(array('url' => 'foo/bar', 'files' => true)) }}
    <input type="file" name="images[]">
{{ Form::close() }}

How can I validate this field with laravel 4 validation? I tried this rule but it didn't work:

$rules = array('images[]' => 'required|image');

Try something like this:

$rules = array(
    'images'     => 'required|min:1|integerOrArray'
);

Based on the answer here

Use the validator from here

First of all are you running "images[]" over a loop? There is plenty of code examples for laravel 4 that actually don't work at all... And people who wrote them don't know how to use var_dump()...

If not - your probably running validation over a array of objects, try check:

var_dump(Input::file('files'));

So now after this lecture, lets run a for loop (had some issue with foreach idk why):

$files = Input::file('images');
$filesCount = count($files);

for ($i=0; $i < $filesCount; $i++)
{
    $file = $files[$i];
    $input = array(
        'upload' => $files[$i]
    );

    $rules = array(
        'upload' => 'image|max:15500'
    );
    $validation = Validator::make($input, $rules);
}

And now you can run your validation. Laravel4 only tries to valid mime type... so its vulnerable.