- java.lang.Object
-
- io.rxmicro.validation.base.AbstractListConstraintValidator
-
- io.rxmicro.validation.validator.SizeConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<List<?>>
public class SizeConstraintValidator extends AbstractListConstraintValidator
- Author:
- nedis
-
-
Constructor Summary
Constructors Constructor Description SizeConstraintValidator(int expectedLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(List<?> value, io.rxmicro.rest.model.HttpModelType httpModelType, String modelName)Validates a single actual.-
Methods inherited from class io.rxmicro.validation.base.AbstractListConstraintValidator
validateList, validateList
-
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
-
-
-
-
Method Detail
-
validate
public void validate(List<?> value, io.rxmicro.rest.model.HttpModelType httpModelType, String modelName) throws io.rxmicro.http.error.ValidationException
Description copied from interface:ConstraintValidatorValidates a single actual. The state ofactualmust not be altered.- Parameters:
value- actual value to validatehttpModelType- http model typemodelName- parameter or header name- Throws:
io.rxmicro.http.error.ValidationException- if actual does not pass the constraint
-
-