org.rhq.enterprise.gui.legacy.validator
Class IdenticalValidator
java.lang.Object
org.rhq.enterprise.gui.legacy.validator.BaseValidator
org.rhq.enterprise.gui.legacy.validator.IdenticalValidator
public class IdenticalValidator
- extends BaseValidator
This class is for use in the commons validation package to validate two identical fields.
|
Method Summary |
boolean |
validate(Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages msgs,
javax.servlet.http.HttpServletRequest request)
Validates if two fields are equal in terms of String's equal() function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdenticalValidator
public IdenticalValidator()
validate
public boolean validate(Object bean,
org.apache.commons.validator.ValidatorAction va,
org.apache.commons.validator.Field field,
org.apache.struts.action.ActionMessages msgs,
javax.servlet.http.HttpServletRequest request)
- Validates if two fields are equal in terms of String's equal() function. Example of use:
secondProperty password2
- Specified by:
validate in class BaseValidator
msgs - Any errors should be stored in the ActionErrors collection.request - The current http request that is being processed.
- Returns:
- Returns true if the fields property and property2 are identical.
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.