Package com.vaadin.data
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.vaadin.data.ValidationException
-
- All Implemented Interfaces:
Serializable
public class ValidationException extends Exception
Indicates validation errors in aBinder
when a field value is validated.- Since:
- 8.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 validationerrors
list.
-
Method Summary
All Methods Instance Methods Concrete 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 byfield 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 bybean 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 validationerrors
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 bybean 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 byfield level validation errors
.- Returns:
- binder validation errors list
-
-