Validator/Constraints/StatusValidator.php
public function validate($value, Constraint $constraint)
    {
        if(null === $value) {
            return;
        }

        if(!in_array($value, JobStatus::values())){
            $this->context->buildViolation($constraint->message)
                ->setParameter('{{string}}', $value)
                ->addViolation();
        }
    }
public function validate($value, Constraint $constraint)
    {
        if(null === $value) {
            return;
        }

        if(!in_array($value, JobStatus::values())){
            $this->context->buildViolation($constraint->message)
                ->setParameter('{{string}}', $value)
                ->addViolation();
        }
    }
{@inheritdoc}