public function validate($value, Constraint $constraint)
    {
        if ($constraint instanceof ChoiceUnwrapper) {
            if ((null === $value || '' === $value) && $constraint->allowBlank) {
                return;
            }
            $resolvedChoices = [];
            if (\is_array($constraint->choices)) {
                /** @noinspection ForeachSourceInspection */
                foreach ($constraint->choices as $choice) {
                    if (\is_array($choice)) {
                        /** @var array $choice */
                        foreach ($choice as $subChoice) {
                            $resolvedChoices[] = $subChoice;
                        }
                    } else {
                        $resolvedChoices[] = $choice;
                    }
                }

                $constraint->choices = $resolvedChoices;
            }
        }

        parent::validate($value, $constraint);
    }
public function validate($value, Constraint $constraint)
    {
        if ($constraint instanceof ChoiceUnwrapper) {
            if ((null === $value || '' === $value) && $constraint->allowBlank) {
                return;
            }
            $resolvedChoices = [];
            if (\is_array($constraint->choices)) {
                /** @noinspection ForeachSourceInspection */
                foreach ($constraint->choices as $choice) {
                    if (\is_array($choice)) {
                        /** @var array $choice */
                        foreach ($choice as $subChoice) {
                            $resolvedChoices[] = $subChoice;
                        }
                    } else {
                        $resolvedChoices[] = $choice;
                    }
                }

                $constraint->choices = $resolvedChoices;
            }
        }

        parent::validate($value, $constraint);
    }
{@inheritdoc}