public interface Validatable
| Modifier and Type | Method and Description |
|---|---|
static <T> com.holonplatform.core.Validator<T> |
adapt(com.vaadin.flow.data.binder.Validator<T> validator)
Adapt given
Validator to be used as a Validator. |
static <T> com.vaadin.flow.data.binder.Validator<T> |
adapt(com.holonplatform.core.Validator<T> validator)
Adapt given
Validator to be used as a Validator. |
static <T> com.holonplatform.core.Validator<T> |
adapt(com.vaadin.flow.data.binder.Validator<T> validator,
com.vaadin.flow.component.Component component)
Adapt given
Validator to be used as a Validator. |
static <T> com.holonplatform.core.Validator<T> |
adapt(com.vaadin.flow.data.binder.Validator<T> validator,
Input<T> input)
Adapt given
Validator to be used as a Validator. |
static <T> com.holonplatform.core.Validator<T> |
adapt(com.vaadin.flow.data.binder.Validator<T> validator,
Supplier<com.vaadin.flow.data.binder.ValueContext> contextSupplier)
Adapt given
Validator to be used as a Validator. |
default boolean |
isValid()
Check if the current value is valid, swallowing any validation exception.
|
void |
validate()
Checks the validity of the current component value against every registered validator, if any.
|
void validate()
throws com.holonplatform.core.Validator.ValidationException
Validator.ValidationException is thrown.
The Validator.ValidationException is Localizable, providing optional message code and arguments for
validation message localization.
com.holonplatform.core.Validator.ValidationException - If the value is not validdefault boolean isValid()
true if the current value is valid, false otherwisevalidate()static <T> com.holonplatform.core.Validator<T> adapt(com.vaadin.flow.data.binder.Validator<T> validator)
Validator to be used as a Validator.T - Validator value typevalidator - The validator to adapt (not null)static <T> com.holonplatform.core.Validator<T> adapt(com.vaadin.flow.data.binder.Validator<T> validator,
Input<T> input)
Validator to be used as a Validator.T - Validator value typevalidator - The validator to adapt (not null)input - The input to validatestatic <T> com.holonplatform.core.Validator<T> adapt(com.vaadin.flow.data.binder.Validator<T> validator,
com.vaadin.flow.component.Component component)
Validator to be used as a Validator.T - Validator value typevalidator - The validator to adapt (not null)component - The component to validatestatic <T> com.holonplatform.core.Validator<T> adapt(com.vaadin.flow.data.binder.Validator<T> validator,
Supplier<com.vaadin.flow.data.binder.ValueContext> contextSupplier)
Validator to be used as a Validator.T - Validator value typevalidator - The validator to adapt (not null)contextSupplier - Value context supplier (not null)static <T> com.vaadin.flow.data.binder.Validator<T> adapt(com.holonplatform.core.Validator<T> validator)
Validator to be used as a Validator.T - Validator value typevalidator - The validator to adapt (not null)Copyright © 2020 The Holon Platform. All rights reserved.