title: How to validate each array index in Laravel
body: <p>I have array indexes storing data through ajax call. I want to put validation on only one index in the array. Here is my code.</p>
  <pre><code> foreach($request-&gt;info as $info){
                   
                      $order = new Shipment; 
                      $order-&gt;clientRef =$info[0]; 
                      $order-&gt;receiverName =$info[1];  //validate name only
                      $order-&gt;deliverAddress =$info[2];  
                      $order-&gt;save();
  }
  </code></pre>
  <p>I need to validate only <code>$info[1];</code> as <code>required</code></p>
  <p>Array from front end as below</p>
  <pre><code> array:1 [
    &quot;info&quot; =&gt; array:1 [
      0 =&gt; array:21 [
        0 =&gt; &quot;123&quot;
        1 =&gt; null
        2 =&gt; &quot;xyz&quot;
      ]
    ]
  ]
  </code></pre>