org.springmodules.validation.bean.rule
Class LengthValidationRule
java.lang.Object
org.springmodules.validation.bean.rule.AbstractValidationRule
org.springmodules.validation.bean.rule.LengthValidationRule
- All Implemented Interfaces:
- ValidationRule
public class LengthValidationRule
- extends AbstractValidationRule
An AbstractValidationRule
that validates and checks that the length of a string is within specific bounds.
- Author:
- Uri Boness
Constructor Summary |
LengthValidationRule(int min,
int max)
Constructs a new LengthValidationRule with given lower (min) and upper (max) bounds. |
Methods inherited from class org.springmodules.validation.bean.rule.AbstractValidationRule |
checkContexts, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, getDefaultErrorMessage, getErrorArguments, getErrorCode, isApplicable, setApplicabilityCondition, setContextTokens, setDefaultErrorMessage, setErrorArgumentsResolver, setErrorCode, supportsNullValues |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ERROR_CODE
public static final String DEFAULT_ERROR_CODE
- See Also:
- Constant Field Values
LengthValidationRule
public LengthValidationRule(int min,
int max)
- Constructs a new LengthValidationRule with given lower (min) and upper (max) bounds.
- Parameters:
min
- The lower bound.max
- The upper bound.
getCondition
public Condition getCondition()
- Returns the condition of this validation rule.
- Returns:
- The condition of this validation rule.
- See Also:
ValidationRule.getCondition()
getMin
public int getMin()
getMax
public int getMax()
Copyright © 2009. All Rights Reserved.