Is there a way to make the array validation messages more clear to the user?
Validator::make($rows->toArray(), [ '*.initials' => 'required|max:10', '*.first_name' => 'max:50', '*.prefixes' => 'max:10', '*.last_name' => 'required|max:50', '*.email' => 'required|email|unique:users,email' ])->validate();
Returns messages like: The 0.email has already been taken.
I can add 0.email to the attributes array in validation.php but that only returns the field name. I prefer to return the key as well to clarify on which row the error is.
This error message is what i like to see: The E-mailadress on row 1 has already been taken.