Class ValidationErrors
java.lang.Object
org.springframework.boot.context.properties.bind.validation.ValidationErrors
- All Implemented Interfaces:
Iterable<org.springframework.validation.ObjectError>
public class ValidationErrors
extends Object
implements Iterable<org.springframework.validation.ObjectError>
A collection of
ObjectErrors caused by bind validation failures.
Where possible, included FieldErrors will be OriginProvider.- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.validation.ObjectError>Return the list of all validation errors.Return the properties that were bound before validation failed.getName()Return the name of the item that was being validated.booleanIterator<org.springframework.validation.ObjectError>iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getName
Return the name of the item that was being validated.- Returns:
- the name of the item
-
getBoundProperties
Return the properties that were bound before validation failed.- Returns:
- the boundProperties
-
hasErrors
public boolean hasErrors() -
getAllErrors
Return the list of all validation errors.- Returns:
- the errors
-
iterator
-