Class RequiredConstraintValidator

    • Constructor Detail

      • RequiredConstraintValidator

        public RequiredConstraintValidator()
    • Method Detail

      • validate

        public void validate​(Object actual,
                             HttpModelType httpModelType,
                             String modelName)
        Description copied from interface: ConstraintValidator
        Validates the single actual.

        The state of the actual must not be altered.

        Specified by:
        validate in interface ConstraintValidator<Object>
        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name
      • validateIterable

        public void validateIterable​(Iterable iterable,
                                     HttpModelType httpModelType,
                                     String modelName)
        Description copied from interface: ConstraintValidator
        Validates all items from the iterable.

        The state of the iterable must not be altered.

        If the iterable is null validator does not throw ValidationException.

        Specified by:
        validateIterable in interface ConstraintValidator<Object>
        Parameters:
        iterable - the iterable to validate
        httpModelType - the http model type
        modelName - the parameter or header name
      • validateIterable

        public void validateIterable​(Iterable iterable)
        Description copied from interface: ConstraintValidator
        Validates all items from the iterable.

        The state of the value must not be altered.

        If the iterable is null validator does not throw ValidationException.

        Specified by:
        validateIterable in interface ConstraintValidator<Object>
        Parameters:
        iterable - the iterable to validate
      • validateMapValues

        public void validateMapValues​(Map map,
                                      HttpModelType httpModelType,
                                      String modelName)
        Description copied from interface: ConstraintValidator
        Validates the map values.

        The state of the map must not be altered.

        Specified by:
        validateMapValues in interface ConstraintValidator<Object>
        Parameters:
        map - the map with values to validate
        httpModelType - the http model type
        modelName - the parameter or header name
      • validateMapValues

        public void validateMapValues​(Map map)
        Description copied from interface: ConstraintValidator
        Validates the root model map values.

        The state of the map must not be altered.

        Specified by:
        validateMapValues in interface ConstraintValidator<Object>
        Parameters:
        map - the map with values to validate