struts-user mailing list archives

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

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 
(first.last@domain.com)


thanx
Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message