Module rxmicro.validation
Package io.rxmicro.validation.validator
Class MaxLengthConstraintValidator
- java.lang.Object
-
- io.rxmicro.validation.base.AbstractMaxConstraintValidator<Integer>
-
- io.rxmicro.validation.validator.MaxLengthConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<String>
public class MaxLengthConstraintValidator extends AbstractMaxConstraintValidator<Integer> implements ConstraintValidator<String>
Validator for theMaxLengthconstraint.- Since:
- 0.1
- Author:
- nedis
- See Also:
MaxLength
-
-
Constructor Summary
Constructors Constructor Description MaxLengthConstraintValidator(int maxValue, boolean inclusive)Creates the default instance ofMaxLengthConstraintValidatorwith the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(String value, HttpModelType httpModelType, String modelName)Validates the single actual.-
Methods inherited from class io.rxmicro.validation.base.AbstractMaxConstraintValidator
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, validateList, validateList
-
-
-
-
Constructor Detail
-
MaxLengthConstraintValidator
public MaxLengthConstraintValidator(int maxValue, boolean inclusive)Creates the default instance ofMaxLengthConstraintValidatorwith the specified parameters.- Parameters:
maxValue- the supported max value.inclusive- whether the specified minimum is inclusive or exclusive.
-
-
Method Detail
-
validate
public void validate(String 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<String>- Parameters:
value- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
-