类 ValidationErrors
- java.lang.Object
- org.springframework.boot.context.properties.bind.validation.ValidationErrors
- 所有已实现的接口:
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.- 从以下版本开始:
- 2.0.0
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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()
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
方法详细资料
getName
public ConfigurationPropertyName getName()
Return the name of the item that was being validated.- 返回:
- the name of the item
getBoundProperties
public Set<ConfigurationProperty> getBoundProperties()
Return the properties that were bound before validation failed.- 返回:
- the boundProperties
hasErrors
public boolean hasErrors()
getAllErrors
public List<org.springframework.validation.ObjectError> getAllErrors()
Return the list of all validation errors.- 返回:
- the errors