Class ValidWhen

java.lang.Object
org.apache.struts.validator.validwhen.ValidWhen

public class ValidWhen extends Object
This class contains the validwhen validation that is used in the validator-rules.xml file.
Since:
Struts 1.2
  • 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 in test parameter.
      Parameters:
      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.
      Returns:
      true if meets stated requirements, false otherwise.