title: Getting the index of a list and display in error message during validation in Laravel
body: <p>I have a validation rule as follows. I'm using the <strong>validate</strong> method via the <strong>ValidateRequests</strong> trait.</p>
  
  <pre><code>$this-&gt;validate($request, [
      'entries'                 =&gt; 'required|max:5',
      'entries.*.name'          =&gt; 'required',
      'entries.*.email'         =&gt; 'required|email',
      'entries.*.mobile_number' =&gt; 'required'
  ]);
  </code></pre>
  
  <p>And these are some sample error messages that I've encountered.</p>
  
  <pre><code>[
      'entries.0.name'  =&gt; ['The entries.0.name is required.'],
      'entries.1.email' =&gt; ['The entries.1.email must be a valid email address.']
  ]
  </code></pre>
  
  <p>Is there a way to modify the message to these by using only the validation.php in modifying such messages?</p>
  
  <pre><code>[
      'entries.0.name'  =&gt; ['Line 0 - The name is required.'],
      'entries.1.email' =&gt; ['Line 1 - The email must be a valid email address.']
  ]
  </code></pre>