是在formbean的ActionErrors validate()方法里判断的.看我写的.
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    ActionErrors errors = new ActionErrors(); 
if(条件判断){
     errors.add("error", new ActionError("err.userId.password"));
}
      return (errors);  
  }