Package com.vaadin.flow.data.binder
Interface BinderValidationErrorHandler
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultBinderValidationErrorHandler
Handler for applying effects to
HasValue
components in Binder
based on ValidationResult
for the user input. Use
Binder.setValidationErrorHandler(BinderValidationErrorHandler)
to
register an instance of this class to be able to customize validation error
handling.- Since:
- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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)
.void
handleError
(HasValue<?, ?> field, ValidationResult result) Handles a validation error emitted when trying to write the value of the given field.
-
Method Details
-
handleError
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
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:
-