show error message then. if ($value->isNotSelectable()) { $this->context->buildViolation($constraint->message) ->setParameter('{{ name }}', $value->getName()) ->setParameter('{{ full_path }}', $value->getFullPath()) ->addViolation(); } } }