com.vaadin.flow.data.binder.
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.vaadin.flow.data.binder.ValidationException
-
All Implemented Interfaces:
public class ValidationException extends Exception
Indicates validation errors in a
Binder
when a field value is validated.Since:
1.0
Author:
Vaadin Ltd
See Also:
Binder.writeBean(Object)
,Binder.writeBeanIfValid(Object)
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidationException​(List<BindingValidationStatus<?>> fieldValidationErrors, List<ValidationResult> beanValidationErrors)
Constructs a new exception with validation
errors
list.
-
Method Summary
All Methods Modifier and Type Method Description List<ValidationResult>
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<BindingValidationStatus<?>>
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
.List<ValidationResult>
getValidationErrors()
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 Detail
-
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 Detail
-
getValidationErrors
public List<ValidationResult> getValidationErrors()
Gets both field and bean level validation errors.
Returns:
a list of all validation errors
-
getFieldValidationErrors
public List<BindingValidationStatus<?>> 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
public List<ValidationResult> 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
-
-