net.sf.springlayout.web.validator
Class EmailValidator
java.lang.Object
net.sf.springlayout.web.validator.AbstractValidationRule
net.sf.springlayout.web.validator.EmailValidator
- All Implemented Interfaces:
- ValidationRule
public class EmailValidator
- extends AbstractValidationRule
Email Validation Rule. Ensures that a field meets minimum criteria for a valid email address.
- Author:
- Rob Monie, 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's a valid email address. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmailValidator
public EmailValidator()
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's a valid email address. 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.