I try to have a required value depends on radio button
$builder
->add('radio',ChoiceType::class,[
'label' => 'My radio button',
'choices'=>[
'Yes'=>'Yes',
"No"=>"No"
],
"expanded"=>true,
"multiple"=>false,
'required' => true,
'placeholder' => false
])
->add('file input', FileInputType::class, [
'label' => 'put your file',
'mapped' => false,
'required' => true or false // depends on radio button
])
But i can't find how to do this, i'm a beginner in symfony. I use Symfony 5
Please if you have an idea i'm listening