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