laravel validation data if request exists another value 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'
]);