public function setValidationClass($class) {
        trigger_error('Schema::setValidationClass() is deprecated. Use Schema::setValidationFactory() instead.', E_USER_DEPRECATED);

        if (!is_a($class, Validation::class, true)) {
            throw new \InvalidArgumentException("$class must be a subclass of ".Validation::class, 500);
        }

        $this->setValidationFactory(function () use ($class) {
            if ($class instanceof Validation) {
                $result = clone $class;
            } else {
                $result = new $class;
            }
            return $result;
        });
        $this->validationClass = $class;
        return $this;
    }