La validation à terme existe des règles de tableau
//Be careful it does multiple queries.
//'document_group_ids.*' => 'exists:document_groups,id'
public function rules(): array
{
return [
'document_type_id' => 'required|integer|exists:document_types,id',
'document_group_ids' => 'required|array',
'document_group_ids.*' => 'exists:document_groups,id',
];
}
Murat Çakmak