Class ValidWhen
java.lang.Object
org.apache.struts.validator.validwhen.ValidWhen
This class contains the validwhen validation that is used in the
validator-rules.xml file.
- Since:
- Struts 1.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanvalidateValidWhen(Object bean, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field, ActionMessages errors, org.apache.commons.validator.Validator validator, HttpServletRequest request) Checks if the field matches the boolean expression specified intestparameter.
-
Constructor Details
-
ValidWhen
public ValidWhen()
-
-
Method Details
-
validateValidWhen
public static boolean validateValidWhen(Object bean, org.apache.commons.validator.ValidatorAction va, org.apache.commons.validator.Field field, ActionMessages errors, org.apache.commons.validator.Validator validator, HttpServletRequest request) Checks if the field matches the boolean expression specified intestparameter.- Parameters:
bean- The bean validation is being performed on.va- TheValidatorActionthat is currently being performed.field- TheFieldobject associated with the current field being validated.errors- TheActionMessagesobject to add errors to if any validation errors occur.request- Current request object.- Returns:
trueif meets stated requirements,falseotherwise.
-