Package com.vaadin.flow.data.binder
Interface BinderValidationErrorHandler
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultBinderValidationErrorHandler
public interface BinderValidationErrorHandler extends Serializable
Handler for applying effects toHasValuecomponents inBinderbased onValidationResultfor the user input. UseBinder.setValidationErrorHandler(BinderValidationErrorHandler)to register an instance of this class to be able to customize validation error handling.- Since:
- Author:
- Vaadin Ltd
- See Also:
DefaultBinderValidationErrorHandler,Binder.setValidationErrorHandler(BinderValidationErrorHandler)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearError(HasValue<?,?> field)Clears the error condition of the given field, if one has been previously set withhandleError(com.vaadin.flow.component.HasValue<?, ?>, com.vaadin.flow.data.binder.ValidationResult).voidhandleError(HasValue<?,?> field, ValidationResult result)Handles a validation error emitted when trying to write the value of the given field.
-
-
-
Method Detail
-
handleError
void handleError(HasValue<?,?> field, ValidationResult result)
Handles a validation error emitted when trying to write the value of the given field.See #clearError for clearing the error.
- Parameters:
field- the field with the invalid valueresult- the validation error result- See Also:
clearError(HasValue)
-
clearError
void clearError(HasValue<?,?> field)
Clears the error condition of the given field, if one has been previously set withhandleError(com.vaadin.flow.component.HasValue<?, ?>, com.vaadin.flow.data.binder.ValidationResult).- Parameters:
field- the field to clear the previous error from- See Also:
handleError(HasValue, ValidationResult)
-
-