Monday, November 13, 2023

Validation with 2 column

 

$validatedData = $request->validate([
'item_id' => 'required|unique:req_records,item_id,' . $request->item_id . ',id,req_id,' . $req_id,

],
[
'item_id.unique' => 'You already requested this item with same req_id',
]);

No comments:

Post a Comment