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 ofObjectErrors
caused by bind validation failures. Where possible, includedFieldErrors
will be OriginProvider.- Since:
- 2.0.0
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.springframework.validation.ObjectError>
getAllErrors()
Return the list of all validation errors.Set<ConfigurationProperty>
getBoundProperties()
Return the properties that were bound before validation failed.ConfigurationPropertyName
getName()
Return the name of the item that was being validated.boolean
hasErrors()
Iterator<org.springframework.validation.ObjectError>
iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Method Detail
getName
public ConfigurationPropertyName getName()
Return the name of the item that was being validated.- Returns:
- the name of the item
getBoundProperties
public Set<ConfigurationProperty> getBoundProperties()
Return the properties that were bound before validation failed.- Returns:
- the boundProperties
hasErrors
public boolean hasErrors()
getAllErrors
public List<org.springframework.validation.ObjectError> getAllErrors()
Return the list of all validation errors.- Returns:
- the errors