public Config validate(Map<String, String> connectorConfigs) {
        ConfigDef configDef = config();
        if (null == configDef) {
            throw new ConnectException(
                String.format("%s.config() must return a ConfigDef that is not null.", this.getClass().getName())
            );
        }
        List<ConfigValue> configValues = configDef.validate(connectorConfigs);
        return new Config(configValues);
    }
Validate the connector configuration values against configuration definitions.
@param connectorConfigs the provided configuration values
@return a parsed and validated {@link Config} containing any relevant validation errors with the raw
{@code connectorConfigs} which should prevent this configuration from being used.
connect/api/src/main/java/org/apache/kafka/connect/connector/Connector.java