If the need is across the application, then modifying the app-wide interceptor makes sense.
App-wide rule-based validations require something higher-level than reworking existing validators, or writing new ones, to express something that is likely declarative in nature. Seems more like "run this bunch of validations based on this condition"--rather than simply look up validations based on the action name, lookup should be based on the condition(s). That's mechanism-level, not validate-level. d. On Nov 28, 2011 8:33 PM, "Li Ying" <liying.cn.2...@gmail.com> wrote: > Changing the [validation interceptor] will switch on/off the all > validations by one pre-condition. > > But what he need is: > if and only if pre-condition-A is true, run validation-A; > if and only if pre-condition-B is true, run validation-B; > etc... > > So, I think the right way is, change the validators. > > > > 2011/11/29 Dave Newton <davelnew...@gmail.com>: > > If the goal is to execute validations based on arbitrary preconditions (I > > missed the original req) the *easiest* thing to do might be to just > > extend/usurp the existing validation interceptor to do that precondition > > check. > > > > d. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >