jodd.vtor.constraint
Class MinLengthConstraint
java.lang.Object
jodd.vtor.constraint.MinLengthConstraint
- All Implemented Interfaces:
- ValidationConstraint<MinLength>
public class MinLengthConstraint
- extends java.lang.Object
- implements ValidationConstraint<MinLength>
|
Field Summary |
protected int |
min
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
min
protected int min
MinLengthConstraint
public MinLengthConstraint()
MinLengthConstraint
public MinLengthConstraint(int min)
getMin
public int getMin()
setMin
public void setMin(int min)
configure
public void configure(MinLength annotation)
- Description copied from interface:
ValidationConstraint
- Configures constraint from associated annotation.
- Specified by:
configure in interface ValidationConstraint<MinLength>
isValid
public boolean isValid(ValidationConstraintContext vcc,
java.lang.Object value)
- Description copied from interface:
ValidationConstraint
- Performs validation in context of target object on provided value.
- Specified by:
isValid in interface ValidationConstraint<MinLength>
- Returns:
true if validation passes, otherwise false.
validate
public static boolean validate(java.lang.Object value,
int min)
Copyright © 2003-2013 Jodd Team