net.sf.springlayout.web.validator
Class MaxLengthValidator
java.lang.Object
net.sf.springlayout.web.validator.AbstractValidationRule
net.sf.springlayout.web.validator.MaxLengthValidator
- All Implemented Interfaces:
- ValidationRule
public class MaxLengthValidator
- extends AbstractValidationRule
Method Summary |
java.lang.String |
getJavascript()
Get the javascript used to validate this rule |
int |
getMaxLength()
|
boolean |
isValid(java.lang.Object obj,
java.lang.String fieldKey)
Returns if this object is valid according to this validation rule |
void |
setMaxLength(int maxLength)
Sets the maxLength for this MaxLengthValidator. |
void |
validate(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors errors,
java.lang.String fieldKey)
Validate the object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaxLengthValidator
public MaxLengthValidator()
getJavascript
public java.lang.String getJavascript()
- Description copied from class:
AbstractValidationRule
- Get the javascript used to validate this rule
- Specified by:
getJavascript
in class AbstractValidationRule
- Returns:
validate
public void validate(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors errors,
java.lang.String fieldKey)
- Description copied from class:
AbstractValidationRule
- Validate the object
- Specified by:
validate
in class AbstractValidationRule
isValid
public boolean isValid(java.lang.Object obj,
java.lang.String fieldKey)
- Description copied from interface:
ValidationRule
- Returns if this object is valid according to this validation rule
- Returns:
setMaxLength
public void setMaxLength(int maxLength)
- Sets the maxLength for this MaxLengthValidator.
- Parameters:
maxLength
- Sets the maxLength for this MaxLengthValidator.
getMaxLength
public int getMaxLength()
Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.