This is the error I am getting at the moment:
Illuminate\Support\ViewErrorBag {#1725 ▼ // resources/views/components/forms/form.blade.php
#bags: array:1 [▶
"default" => Illuminate\Support\MessageBag {#1726 ▶
#messages: array:5 [▶
"name" => array:1 [▶
0 => "The name field is required."
]
"description" => array:1 [▶
0 => "The description field is required."
]
"meta.0" => array:1 [▶
0 => "If there is addition description for please make it at least 30 characters long"
]
"meta.1" => array:1 [▶
0 => "If there is addition description for please make it at least 30 characters long"
]
"meta.2" => array:1 [▶
0 => "If there is addition description for please make it at least 30 characters long"
]
]
#format: ":message"
}
]
}
In the Request class I am trying to do this, but without success:
public function attributes(): array
{
return [
'meta.*' => 'meta'
];
}
Is it possible to merge all the meta.1, meta.2 ... into meta error attribute?
failedValidationmethod in your Form Request and manipulate the errors / messages before the Exception is thrown