public function validate($page, Constraint $constraint)
    {
        if (!$page instanceof CreateAction && !$page instanceof Page) {
            throw new \InvalidArgumentException(sprintf(
                '%s can only validate %s or %s objects; %s given.',
                self::class,
                Page::class,
                CreateAction::class,
                is_object($page) ? get_class($page) : gettype($page)
            ));
        }
        if ($actualPage = $this->pageLoader->retrieveByPath(
            $page instanceof CreateAction
                ? $page->getFullPath()
                : $page->getPath()
        )) {
            $this->context
                ->buildViolation($constraint->message)
                    ->atPath('path')
                    ->setParameter('{{ name }}', $actualPage->getName())
                    ->setParameter('{{ path }}', $actualPage->getPath())
                    ->setParameter('{{ parent }}', $actualPage->getParent()->getName())
                ->addViolation()
            ;
        }
    }