public interface BinderValidationErrorHandler extends Serializable
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.DefaultBinderValidationErrorHandler
,
Binder.setValidationErrorHandler(BinderValidationErrorHandler)
Modifier and Type | Method and 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.
|
void handleError(HasValue<?,?> field, ValidationResult result)
See #clearError for clearing the error.
field
- the field with the invalid valueresult
- the validation error resultclearError(HasValue)
void clearError(HasValue<?,?> field)
handleError(com.vaadin.flow.component.HasValue<?, ?>, com.vaadin.flow.data.binder.ValidationResult)
.field
- the field to clear the previous error fromhandleError(HasValue, ValidationResult)
Copyright © 2024. All rights reserved.