How to validate with custom request, my request with an array key
$request = [
'link_inc_characteristic_id' => $inc_char_id[$i],
'value' => $value[$i],
'created_by' => $created_by,
'last_updated_by' => $last_updated_by,
];
$this->validate($request, [
'value['.$i.']' => 'max:30'
]);
$linkIncCharacteristicValue = LinkIncCharacteristicValue::create($request);
return Response::json($linkIncCharacteristicValue);
[EDIT] [CODE UPDATED] display error:
Argument 1 passed to App\Http\Controllers\Controller::validate() must be an instance of Illuminate\Http\Request, array given,
value[18] value[19] value[20] value[5] asasasaasshgafshgafshgafshgafsfafsasasasa value[7] value[8] value[9]
– Khoerodin