org.springframework.boot.context.properties.bind.validation

Class ValidationErrors

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


    public class ValidationErrors
    extends java.lang.Object
    implements java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List<org.springframework.validation.ObjectError> getAllErrors()
      Return the list of all validation errors.
      java.util.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() 
      java.util.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 java.util.Set<ConfigurationProperty> getBoundProperties()
        Return the properties that were bound before validation failed.
        Returns:
        the boundProperties
      • hasErrors

        public boolean hasErrors()
      • getAllErrors

        public java.util.List<org.springframework.validation.ObjectError> getAllErrors()
        Return the list of all validation errors.
        Returns:
        the errors
      • iterator

        public java.util.Iterator<org.springframework.validation.ObjectError> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<org.springframework.validation.ObjectError>