fix error in validation

This commit is contained in:
Julien Fastré 2018-06-13 16:46:20 +02:00
parent 20b03ee9d1
commit 39d70d5d48

View File

@ -61,7 +61,7 @@ class GenderFilter implements FilterInterface,
public function validateForm($data, ExecutionContextInterface $context)
{
if (count($data['accepted_genders']) === 0) {
if ($data['accepted_genders'] === null) {
$context->buildViolation("You should select an option")
->addViolation();
}