net.sf.springlayout.web.validator
Class DateValidator
java.lang.Object
net.sf.springlayout.web.validator.AbstractValidationRule
net.sf.springlayout.web.validator.DateValidator
- All Implemented Interfaces:
- ValidationRule
public class DateValidator
- extends AbstractValidationRule
Date Validation Rule. Ensures that a field is a validly formatted date.
- Author:
- Adam Boas
Method Summary |
java.lang.String |
getJavascript()
Get the javascript used to validate this rule |
boolean |
isValid(java.lang.Object obj,
java.lang.String fieldKey)
Returns if this object is valid according to this validation rule |
void |
validate(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors errors,
java.lang.String fieldKey)
Validates the field specified in the field definition against the object
passed to ensure it is a valid date. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateValidator
public DateValidator()
validate
public void validate(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors errors,
java.lang.String fieldKey)
- Validates the field specified in the field definition against the object
passed to ensure it is a valid date. Adds to errors object of validation fails
- Specified by:
validate
in class AbstractValidationRule
- Parameters:
request
- the current servlet requestobj
- the object to validateerrors
- the current errorsfieldKey
- the path to the field in the object to validate- See Also:
net.sf.springlayout.web.validator.ValidationRule#validate(javax.servlet.http.HttpServletRequest, java.lang.Object, org.springframework.validation.Errors, net.sf.springlayout.web.panel.IFieldDefinition)
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:
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:
Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.