All Implemented Interfaces:
TravelValidator, org.springframework.validation.Validator

public class ListCompositeValidator extends TravelCompositeValidator
It has a composite of TravelValidator
Iterates and executes validators for each element of list.
  • Constructor Details

    • ListCompositeValidator

      public ListCompositeValidator()
  • Method Details

    • supports

      public boolean supports(Class<?> clazz)
      Specified by:
      supports in interface org.springframework.validation.Validator
      Overrides:
      supports in class TravelCompositeValidator
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
      Overrides:
      validate in class TravelCompositeValidator
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors, boolean ignoreNull)
      Description copied from interface: TravelValidator
      Validate the supplied target object
      Specified by:
      validate in interface TravelValidator
      Overrides:
      validate in class TravelCompositeValidator
      Parameters:
      target - the object that is to be validated
      errors - contextual state about the validation process
      ignoreNull - ignore validation for null objects
    • pushNestedPath

      protected void pushNestedPath(org.springframework.validation.Errors errors, int index)
      Push the index number onto the nested path stack.
      Parameters:
      errors - contextual state about the validation process
      index - index of the element