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
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
validateValidWhen
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field matches the boolean expression specified intest
parameter.
-
Constructor Details
-
ValidWhen
public ValidWhen()
-
-
Method Details
-
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 intest
parameter.- Parameters:
bean
- The bean validation is being performed on.va
- TheValidatorAction
that is currently being performed.field
- TheField
object associated with the current field being validated.errors
- TheActionMessages
object to add errors to if any validation errors occur.request
- Current request object.- Returns:
true
if meets stated requirements,false
otherwise.
-