validate based in another field laravel code example
Example: laravel form validation based on another field value
$validator = Validator::make($request->all(),[
'program' => 'required',
'music_instrument' => 'required_if:program.*,in:Music'
]);