jodd.vtor.constraint
Class MaxLengthConstraint
java.lang.Object
jodd.vtor.constraint.MaxLengthConstraint
- All Implemented Interfaces:
- ValidationConstraint<MaxLength>
public class MaxLengthConstraint
- extends java.lang.Object
- implements ValidationConstraint<MaxLength>
|
Field Summary |
protected int |
max
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
max
protected int max
MaxLengthConstraint
public MaxLengthConstraint()
MaxLengthConstraint
public MaxLengthConstraint(int max)
getMax
public int getMax()
setMax
public void setMax(int max)
configure
public void configure(MaxLength annotation)
- Description copied from interface:
ValidationConstraint
- Configures constraint from associated annotation.
- Specified by:
configure in interface ValidationConstraint<MaxLength>
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<MaxLength>
- Returns:
true if validation passes, otherwise false.
validate
public static boolean validate(java.lang.Object value,
int max)
Copyright © 2003-2013 Jodd Team