@@ -0,0 +1,2167 @@
+package org.validcool;%0A%0Aimport java.util.function.Consumer;%0A%0A/**%0A * Central point of validation for validcool.%0A * @author amp%0A * @since 1.0%0A */%0Apublic class ValidcoolConfiguration %7B%0A%0A    private boolean logErrorMessages;%0A    private Consumer%3CString%3E errorLogger;%0A    private Consumer%3CString%3E errorHandler;%0A%0A    ValidcoolConfiguration() %7B%0A        logErrorMessages = false;%0A        errorLogger = System.err::println;%0A        errorHandler = (String message) -%3E %7B%0A            throw new ValidationException(message);%0A        %7D;%0A    %7D%0A%0A    /**%0A     * When a validation fails, it will be logged.%0A     */%0A    public void startLogging() %7B%0A        this.logErrorMessages = true;%0A    %7D%0A%0A    /**%0A     * Stops to logIfEnabled error messages when validations fail.%0A     */%0A    public void stopLogging() %7B%0A        this.logErrorMessages = false;%0A    %7D%0A%0A    /**%0A     * Whether error messages are logged when validations fail.%0A     */%0A    public boolean isLogging() %7B%0A        return this.logErrorMessages;%0A    %7D%0A%0A    /**%0A     * Tells validcool how to logIfEnabled error messages, when validations fail.%0A     * By default all error messages are redirected to System.err.%0A     */%0A    public void setErrorLogger(Consumer%3CString%3E errorLogger) %7B%0A        this.errorLogger = errorLogger;%0A    %7D%0A%0A    /**%0A     * Logs the specified error message iff logging is enabled (by calling startLogging).%0A     */%0A    void logIfEnabled(String errorMessage) %7B%0A        if(logErrorMessages) %7B%0A            errorLogger.accept(errorMessage);%0A        %7D%0A    %7D%0A%0A    /**%0A     * Tells validcool how to handle failed validations.%0A     * By default an org.validcool.ValidationException is thrown.%0A     */%0A    public void setErrorHandler(Consumer%3CString%3E errorHandler) %7B%0A        if(errorHandler == null) %7B%0A            throw new IllegalArgumentException(%22tried to set validcool error handling function to null%22, new NullPointerException());%0A        %7D%0A        this.errorHandler = errorHandler;%0A    %7D%0A%0A    /**%0A     * Handles validation error as specified in the configuration class.%0A     */%0A    void handle(String errorMessage) %7B%0A        logIfEnabled(errorMessage);%0A        this.errorHandler.accept(errorMessage);%0A    %7D%0A%0A%7D%0A

change and extend configuration interface, update Validator