title: Image array validation in Laravel 5
body: <p>My application allows the user to upload multiple image files at the same time, however I can't figure out how to validate the array of images. </p>
  
  <pre><code>$input = Request::all();
  
      $rules = array(
          ...
          'image' =&gt; 'required|image'
      );
  
      $validator = Validator::make($input, $rules);
  
      if ($validator-&gt;fails()) {
  
          $messages = $validator-&gt;messages();
  
          return Redirect::to('venue-add')
              -&gt;withErrors($messages);
  
      } else { ...
  </code></pre>
  
  <p>This validation will fail, as <code>'image'</code> is an array, if I change the validation rule to: </p>
  
  <pre><code>    $rules = array(
          ...
          'image' =&gt; 'required|array'
      );
  </code></pre>
  
  <p>The validation will pass, but the images inside of the array haven't been verified.</p>
  
  <p><a href="https://stackoverflow.com/questions/18161785/validation-of-array-form-fields-in-laravel-4-error/18163546#18163546">This answer</a> uses the keyword each to prefix validation rules, however this is in laravel 4.2 and in Laravel 5 it doesn't seem to work.</p>
  
  <p>I've been trying to iterate through the array and validation on each image individually, but is there a built in function to do this for me?</p>