Package com.vaadin.flow.data.binder
Interface HasValidator<V>
-
- Type Parameters:
V
- the value type
- All Superinterfaces:
Serializable
public interface HasValidator<V> extends Serializable
A generic interface for field components and other user interface objects that have a user-editable value that should be validated.- Since:
- 1.0.
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Validator<V>
getDefaultValidator()
Returns a validator that checks the state of the Value.
-
-
-
Method Detail
-
getDefaultValidator
default Validator<V> getDefaultValidator()
Returns a validator that checks the state of the Value. This should be overridden for components with internal value conversion or validation, e.g. when the user is providing a string that has to be parsed into a date. An invalid input from user will be exposed to aBinder
and can be seen as a validation failure.- Returns:
- state validator
-
-