I have a form field like this:
$form->add('tags', EntityType:class, array(
'class' => Tags::class,
'multiple' => true,
'expanded' => true,
'required' => true,
));
This render a nice checkbox list and I need to ensure that at least one option is selected after submiting the form, but even if the required option is true it doesn't work, I tried with NotBlank() and NotNull() constraints, also doesn't work (i.e. the form is valid).
How to avoid empty values from checkbox list by using EntityType form type?