On the form level validation in Symfony 3.3, I'm trying to figure out how to make it so that it is case insensitive. It is comparing against an array of choices.
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('title', CollectionType::class, [
'entry_type' => ChoiceType::class,
'allow_add' => true,
'allow_delete' => true,
'entry_options' => array(
'choices' => array(
"Sample Option",
"Sample Option 2",
"Sample Option 3",
"Sample Option 4"
)
),
'error_bubbling' => false
]);
Under entry_options in choices is the array that it is using for form validation.
What I'm looking to do is be able to pass a case insensitive value like "sample option" or "sample Option" and have that pass the form level validation.
Thanks in advance for any help on this.
Update - As Kevin mentioned, I'm interested in figuring out how/where this should be updated in the framework.