struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kutzinski <>
Subject Select Validation Rules based on context?
Date Mon, 26 Jul 2004 09:36:55 GMT

I like to know if someone has successfully used the validation framework 
to select rules based on a "free" context.
My problem is this:

I have a registration wizard for a product that has different variants 
(for individuals, for companies, ...)
Now I want to reuse the wizard's JSPs, ActionForm, Action for the 
different variants since they are 90% equal.
However there are some differences (e.g. individual has a required field 
Birthday while companies have not).
How do I tell the validation framework to choose the validation rule for 
birthday only if the variant is "indidual"?

BTW: While I could handle the situation above by filling birthday for 
comapnies with a dummy value, it will fail if I have completely 
differing validation rules for the different variants.
E.g.: companies may choose a freely choosable email address while 
individuals have to put a separator (dot) in the mail local part 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message