required array in laravel code example
Example: how to use required_with in laravel to array element
$validator = Validator::make($request->all(), [
"currency" => "nullable|required_with:price.*|string",
//or if you want to check currency for first price then use
// "currency" => "nullable|required_with:price.0|string",
"price" => "required|array|min:3",
"price.*" => "required|string|distinct|min:3",
]);