I am using Laravel version 5.4. I'm validating an array but it's showing an error message by default. I want to show a message for failed validations.
Here is my array input field.
<input readonly type="text" id="users-id" name="student_id[]" placeholder="{{ $details->batch_id }}" value="{{ $details->batch_id}}" class="form-control input-border" required>
I am validating the array in the controller.
'student_id.*'=> 'required|exists:studentinfo,batch_id|distinct|unique:student_projects,student_batchid',
When any validation fails it shows me an error like this.
Given student_id.1 is not exists. Given student_id.2 is not exists.
I want to show input data instead of student_id.1
, student_id.2
...
Like I have inputted 111-111
in my first input field then I want to show 111-111 is not exists.