Package | Description |
---|---|
com.vaadin.flow.data.binder | |
com.vaadin.flow.data.validator |
Modifier and Type | Class and Description |
---|---|
static class |
ValidationResult.SimpleValidationResult
Simple validation result implementation.
|
Modifier and Type | Method and Description |
---|---|
ValidationResult |
Validator.apply(T value,
ValueContext context)
Validates the given value.
|
static ValidationResult |
ValidationResult.create(String errorMessage,
ErrorLevel errorLevel)
Creates the validation result with the given
errorMessage and
errorLevel . |
static ValidationResult |
ValidationResult.error(String errorMessage)
Creates the validation result which represent an error with the given
errorMessage . |
static ValidationResult |
ValidationResult.ok()
Returns a successful result.
|
Modifier and Type | Method and Description |
---|---|
List<ValidationResult> |
ValidationException.getBeanValidationErrors()
Returns a list of the bean level validation errors which caused the
exception, or an empty list if the exception was caused by
field level validation errors . |
List<ValidationResult> |
BinderValidationStatus.getBeanValidationErrors()
Gets the failed bean level validation results.
|
List<ValidationResult> |
BinderValidationStatus.getBeanValidationResults()
Gets the bean level validation results.
|
Optional<ValidationResult> |
BindingValidationStatus.getResult()
Gets the validation result if status is either
BindingValidationStatus.Status.OK or
BindingValidationStatus.Status.ERROR or an empty optional if status is
BindingValidationStatus.Status.UNRESOLVED . |
List<ValidationResult> |
ValidationException.getValidationErrors()
Gets both field and bean level validation errors.
|
List<ValidationResult> |
BinderValidationStatus.getValidationErrors()
Gets both field and bean level validation errors.
|
List<ValidationResult> |
BindingValidationStatus.getValidationResults()
Gets all the validation results related to this binding validation
status.
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultBinderValidationErrorHandler.handleError(HasValue<?,?> field,
ValidationResult result)
Handles a validation error emitted when trying to write the value of the
given field.
|
void |
BinderValidationErrorHandler.handleError(HasValue<?,?> field,
ValidationResult result)
Handles a validation error emitted when trying to write the value of the
given field.
|
protected void |
Binder.handleError(HasValue<?,?> field,
ValidationResult result)
Handles a validation error emitted when trying to write the value of the
given field.
|
protected void |
DefaultBinderValidationErrorHandler.setErrorTheme(HasValue<?,?> field,
ValidationResult result)
Sets error theme for the
field based on result . |
Constructor and Description |
---|
BinderValidationStatus(Binder<BEAN> source,
List<BindingValidationStatus<?>> bindingStatuses,
List<ValidationResult> binderStatuses)
Creates a new binder validation status for the given binder and
validation results.
|
ValidationException(List<BindingValidationStatus<?>> fieldValidationErrors,
List<ValidationResult> beanValidationErrors)
Constructs a new exception with validation
errors list. |
Modifier and Type | Method and Description |
---|---|
ValidationResult |
BeanValidator.apply(Object value,
ValueContext context)
Validates the given value as if it were the value of the bean property
configured for this validator.
|
ValidationResult |
StringLengthValidator.apply(String value,
ValueContext context) |
ValidationResult |
RegexpValidator.apply(String value,
ValueContext context) |
ValidationResult |
RangeValidator.apply(T value,
ValueContext context)
Returns
Result.ok if the value is within the specified bounds,
Result.error otherwise. |
protected ValidationResult |
AbstractValidator.toResult(T value,
boolean isValid)
A helper method for creating a
Result from a value and a validity
flag. |
Copyright © 2023. All rights reserved.