com.vaadin.flow.data.binder.
Class ValidationException
All Implemented Interfaces:
Indicates validation errors in a Binder
when a field value is
validated.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException
(List<BindingValidationStatus<?>> fieldValidationErrors, List<ValidationResult> beanValidationErrors) Constructs a new exception with validation
errors
list. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
.Returns a list of the field level validation errors which caused the exception, or an empty list if the exception was caused by
bean level validation errors
.Gets both field and bean level validation errors.
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
public ValidationException(List<BindingValidationStatus<?>> fieldValidationErrors, List<ValidationResult> beanValidationErrors) Constructs a new exception with validation
errors
list.Parameters:
fieldValidationErrors
- binding validation errors listbeanValidationErrors
- binder validation errors list
-
-
Method Details
-
getValidationErrors
Gets both field and bean level validation errors.
Returns:
a list of all validation errors
-
getFieldValidationErrors
Returns a list of the field level validation errors which caused the exception, or an empty list if the exception was caused by
bean level validation errors
.Returns:
binding validation errors list
-
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
.Returns:
binder validation errors list
-