org.apache.struts.validator.validwhen
Class ValidWhen
java.lang.Objectorg.apache.struts.validator.validwhen.ValidWhen
public class ValidWhen
extends java.lang.Object
This class contains the validwhen validation that is used in the
validator-rules.xml file.
private static Log | log- Commons Logging instance.
|
private static boolean | isString(Object obj)- Returns true if
obj is null or a String.
|
static boolean | validateValidWhen(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)- Checks if the field matches the boolean expression specified in
test parameter.
|
log
private static final Log log
Commons Logging instance.
isString
private static boolean isString(Object obj)
Returns true if obj is null or a String.
validateValidWhen
public static boolean validateValidWhen(Object bean,
ValidatorAction va,
Field field,
ActionMessages errors,
Validator validator,
HttpServletRequest request) Checks if the field matches the boolean expression specified in
test parameter.
bean - The bean validation is being performed on.va - The ValidatorAction that is currently being
performed.field - The Field object associated with the current
field being validated.errors - The ActionMessages object to add errors to if any
validation errors occur.request - Current request object.
true if meets stated requirements,
false otherwise.
Copyright ?? 2000-2014 - The Apache Software Foundation