mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-14 09:19:41 +00:00
fix error in validation
This commit is contained in:
@@ -61,7 +61,7 @@ class GenderFilter implements FilterInterface,
|
|||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context)
|
||||||
{
|
{
|
||||||
if (count($data['accepted_genders']) === 0) {
|
if ($data['accepted_genders'] === null) {
|
||||||
$context->buildViolation("You should select an option")
|
$context->buildViolation("You should select an option")
|
||||||
->addViolation();
|
->addViolation();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user