title: Displaying validation errors from an input array in Laravel
body: <p>I am submitting an array of inputs to my controller like so:</p>
  
  <pre><code>&lt;input id="box-1-nickname" name="box-nickname[]" class="form-control" type="text" placeholder="Required"&gt;
  &lt;input id="box-2-nickname" name="box-nickname[]" class="form-control" type="text" placeholder="Required"&gt;
  </code></pre>
  
  <p>I am doing some validation like this:</p>
  
  <pre><code>$validator = Validator::make(Input::all(), array(
          'supplies-count' =&gt; 'required|in:0,1,2,3,4',
      ));
  
  $arrayValidator = Validator::make(Input::all(), []);
  
  $arrayValidator-&gt;each('box-nickname', ['required|min:1|max:60']);
  
  if( $validator-&gt;fails() || $arrayValidator-&gt;fails() ) {
      return Redirect::route('route-2')
             -&gt;withErrors($arrayValidator)
             -&gt;withInput();
  }
  </code></pre>
  
  <p>The problem is when I try to check the errors like this it doesn't work:</p>
  
  <pre><code>if( $errors-&gt;has('box-1-nickname') ) { echo ' has-error'; }
  </code></pre>