From: "Jeff Beal" <[EMAIL PROTECTED]> > I'd just put that in the Action class instead of in validation. It > seems like more of a "business" decision than a "validation" decision. > (After all, 'Y' and 'N' are both valid responses.) > > In Action: > > if ("Y".equals(myForm.getAccept)) { > return mapping.findForward("accept") > } else { > return mapping.getInputForward(); > }
It's not that simple... something about creating an ActionError and putting it somewhere so it will magically make the message appear on the page when I forward back to the input form. I used to know how to do it, but then things changed. And that's why I want to use Validator. From: "Jim Barrows" <[EMAIL PROTECTED]> >Two ways: > 1) with a mask, where the mask is "Y" or "Yy" > 2) validWhen, which I *think* goes something like this: The problem with both of these is that they just ask for <arg0> which is generally the field label, and then complain that the 'field is invalid' or (strangely) 'field is required'. (validWhen is using 'error.required'.) So I'm down to creating a custom "rule" copying validWhen but giving it a different message, or just doing it manually in the Action, in which case I think the info here will help: http://wiki.apache.org/struts/StrutsDeprecatedActionErrors. Thanks! -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]