How to validate input array with a same name in laravel controller <p>I have a problem when a i try to insert record into table like this .</p> <pre><code>$data = array(); foreach($input['user_id'] as $key =&gt; $user_id) { $data[$key]['user_id'] = $user_id; } foreach($input['start_on'] as $key =&gt; $start_on) { $data[$key]['start_on'] = $start_on; } $this-&gt;validate($request, [ 'time_start' =&gt; 'required|date', 'time_end' =&gt; 'required|date|after:time_start', ]); $rules = [ 'start_on' =&gt; 'required|date|after:time_start|before:time_end|different:start_on' ]; // Iterate and validate each question foreach ($data as $value) { $validator = Validator::make( $value, $rules ); // if ($validator-&gt;fails()) return $validator-&gt;messages()-&gt;all(); } </code></pre> <p>I want to check start_on not equals another start_on.So what can i do?</p>