com.vaadin.flow.data.binder.
Interface BinderValidationErrorHandler
-
All Superinterfaces:
All Known Implementing Classes:
public interface BinderValidationErrorHandler extends Serializable
Handler for applying effects to
HasValue
components inBinder
based onValidationResult
for 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 Modifier and Type Method Description void
clearError(HasValue<?,?> field)
Clears the error condition of the given field, if one has been previously set with
handleError(com.vaadin.flow.component.HasValue<?, ?>, com.vaadin.flow.data.binder.ValidationResult)
.void
handleError(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 resultSee Also:
-
clearError
void clearError(HasValue<?,?> field)
Clears the error condition of the given field, if one has been previously set with
handleError(com.vaadin.flow.component.HasValue<?, ?>, com.vaadin.flow.data.binder.ValidationResult)
.Parameters:
field
- the field to clear the previous error fromSee Also:
-
-