symfony formtype accept nullable attribute code example
Example: required false , form type
$builder->add('name', null, [
'required' => false,
'empty_data' => 'John Doe',
]);
$builder->add('name', null, [
'required' => false,
'empty_data' => 'John Doe',
]);