java.lang.Object
org.springframework.boot.context.properties.bind.validation.ValidationErrors
All Implemented Interfaces:
Iterable<ObjectError>

public class ValidationErrors extends Object implements Iterable<ObjectError>
A collection of ObjectErrors caused by bind validation failures. Where possible, included FieldErrors will be OriginProvider.
Since:
2.0.0
Author:
Phillip Webb, Madhura Bhave
  • Method Details

    • 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<ObjectError> getAllErrors()
      Return the list of all validation errors.
      Returns:
      the errors
    • iterator

      public Iterator<ObjectError> iterator()
      Specified by:
      iterator in interface Iterable<ObjectError>