V - value typepublic interface HasValidator<V>
| Modifier and Type | Method and Description |
|---|---|
void |
addValidator(Validator<? super V> validator)
Adds a validator instance to the component.
|
default void |
addValidators(Validator<? super V>... validators)
Sequentially adds validators to the component.
|
java.util.Collection<Validator<V>> |
getValidators() |
void |
removeValidator(Validator<V> validator)
Removes a validator instance from the component.
|
@StudioElementsGroup(caption="Validators", xmlElement="validators", icon="io/jmix/ui/icon/element/validators.svg") void addValidator(Validator<? super V> validator)
ValidationException must be thrown by the validator
if the value is not valid.validator - a validator to addValidationExceptionvoid removeValidator(Validator<V> validator)
validator - a validator to removedefault void addValidators(Validator<? super V>... validators)
validators - validators to add