- java.lang.Object
-
- io.rxmicro.validation.base.AbstractMinConstraintValidator<Integer>
-
- io.rxmicro.validation.validator.MinSizeConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<List<?>>
public class MinSizeConstraintValidator extends AbstractMinConstraintValidator<Integer> implements ConstraintValidator<List<?>>
Validator for theMinSizeconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
MinSize
-
-
Constructor Summary
Constructors Constructor Description MinSizeConstraintValidator(int minValue, boolean inclusive)Creates the default instance ofMinSizeConstraintValidatorwith the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(List<?> value, HttpModelType httpModelType, String modelName)Validates the single actual.voidvalidateList(List<List<?>> models)Validates the root model list.voidvalidateList(List<List<?>> list, HttpModelType httpModelType, String modelName)Validates the value list.-
Methods inherited from class io.rxmicro.validation.base.AbstractMinConstraintValidator
validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.rxmicro.validation.ConstraintValidator
validate
-
-
-
-
Constructor Detail
-
MinSizeConstraintValidator
public MinSizeConstraintValidator(int minValue, boolean inclusive)Creates the default instance ofMinSizeConstraintValidatorwith the specified parameters.- Parameters:
minValue- the supported min value.inclusive- whether the specified minimum is inclusive or exclusive.
-
-
Method Detail
-
validate
public void validate(List<?> value, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates the single actual.The state of the
actualmust not be altered.- Specified by:
validatein interfaceConstraintValidator<List<?>>- Parameters:
value- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
validateList
public void validateList(List<List<?>> list, HttpModelType httpModelType, String modelName)
Description copied from interface:ConstraintValidatorValidates the value list.The state of the
listmust not be altered.- Specified by:
validateListin interfaceConstraintValidator<List<?>>- Parameters:
list- the list to validatehttpModelType- the http model typemodelName- the parameter or header name
-
validateList
public void validateList(List<List<?>> models)
Description copied from interface:ConstraintValidatorValidates the root model list.The state of the
valuemust not be altered.- Specified by:
validateListin interfaceConstraintValidator<List<?>>- Parameters:
models- the model list to validate
-
-