All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dominokit.domino.ui.utils.HasValidation Maven / Gradle / Ivy

There is a newer version: 1.0.139
Show newest version
package org.dominokit.domino.ui.utils;

import org.dominokit.domino.ui.forms.validations.ValidationResult;
import org.gwtproject.editor.client.Editor;

import java.util.Collections;
import java.util.List;

public interface HasValidation {

    @Editor.Ignore
    ValidationResult validate();

    @Editor.Ignore
    default List validateAll(){
        return Collections.singletonList(validate());
    }

    @Editor.Ignore
    T addValidator(Validator validator);

    @Editor.Ignore
    T removeValidator(Validator validator);

    @Editor.Ignore
    boolean hasValidator(Validator validator);

    @Editor.Ignore
    T invalidate(String errorMessage);

    @Editor.Ignore
    T invalidate(List errorMessages);

    @Editor.Ignore
    List getErrors();

    @Editor.Ignore
    T clearInvalid();

    @FunctionalInterface
    interface Validator {
        ValidationResult isValid();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy