public class MinLengthConstraint extends java.lang.Object implements ValidationConstraint<MinLength>
Modifier and Type | Field and Description |
---|---|
protected int |
min |
Constructor and Description |
---|
MinLengthConstraint() |
MinLengthConstraint(int min) |
Modifier and Type | Method and Description |
---|---|
void |
configure(MinLength annotation)
Configures constraint from associated annotation.
|
int |
getMin() |
boolean |
isValid(ValidationConstraintContext vcc,
java.lang.Object value)
Performs validation in context of target object on provided value.
|
void |
setMin(int min) |
static boolean |
validate(java.lang.Object value,
int min) |
public MinLengthConstraint()
public MinLengthConstraint(int min)
public int getMin()
public void setMin(int min)
public void configure(MinLength annotation)
ValidationConstraint
configure
in interface ValidationConstraint<MinLength>
public boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
ValidationConstraint
isValid
in interface ValidationConstraint<MinLength>
true
if validation passes, otherwise false
.public static boolean validate(java.lang.Object value, int min)
Copyright © 2003-present Jodd Team