public function validate(FormEvent $event)
    {
        /** @var Alias $alias */
        $alias = $event->getData()->getNode()->alias;

        if ($alias instanceof ValueHolderInterface) {
            $alias = $alias->getWrappedValueHolderValue();
        }

        $violations = $this->validator->validate($alias);

        if (!$violations) {
            return;
        }

        $mapper = new ViolationMapper();
        /** @var ConstraintViolationInterface $violation */
        foreach ($violations as $violation) {
            $mapper->mapViolation($violation, $event->getForm(), true);
        }
    }