code: public static function create(ValidatorInterface $validator): self
      {
          $ex = new self($validator->getErrors());
          $ex->validator = $validator;
  
          return $ex;
      }
docs: Create a validation exception from a validator.
  
  @param ValidatorInterface $validator
  @return ValidationException