laravel validation if one element is wrong the whole array is removed code example
Example 1: laravel validate integer between
'item' => 'required|integer|between:1,10',
Example 2: laravel custom validation message
$rules = [
'name' => 'required',
'email' => 'required|email',
'message' => 'required|max:250',
];
$customMessages = [
'required' => 'The :attribute field is required.'
];
$this->validate($request, $rules, $customMessages);