Using Symfony 2.2.4.
I have a form with two choice lists(multiple,non expanded) showing the same elements(entities of a class). I need to throw an error(onsubmit) when the user selects the same element from both choice lists. Is there a way to validate this selection that does not need to traverse both lists checking each element, you know, like an automatic/built in validation.
I need to catch the error and bind it to one of the choice lists in a way that allows me to show it as any other error, meaning through form_errors(form).
Any tips appreciated.