Module rxmicro.validation
Package io.rxmicro.validation.validator
Class StartsWithConstraintValidator
- java.lang.Object
-
- io.rxmicro.validation.validator.StartsWithConstraintValidator
-
- All Implemented Interfaces:
ConstraintValidator<String>
public final class StartsWithConstraintValidator extends Object implements ConstraintValidator<String>
Validator for theStartsWithconstraint.- Since:
- 0.9
- Author:
- nedis
- See Also:
StartsWith
-
-
Constructor Summary
Constructors Constructor Description StartsWithConstraintValidator(String prefix)Creates the default instance ofStartsWithConstraintValidatortype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(String actual, HttpModelType httpModelType, String modelName)Validates the single actual.-
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, validateIterable, validateIterable, validateMapValues, validateMapValues
-
-
-
-
Constructor Detail
-
StartsWithConstraintValidator
public StartsWithConstraintValidator(String prefix)
Creates the default instance ofStartsWithConstraintValidatortype.- Parameters:
prefix- the required prefix for the field value.
-
-
Method Detail
-
validate
public void validate(String actual, 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:
actual- the actual value to validatehttpModelType- the http model typemodelName- the parameter or header name
-
-