you can use form based validation or action based validation in struts 1.2 ,
1) to use form based validation,
form classes must extend ValidatorActionForm or DynaValidatorActionForm
classes.
(org.apache.struts.validator.ValidatorActionForm,org.apache.struts.validator.DynaValidatorActionForm)
2) to use action based validation ,
form classes must extend ValidatorForm or DynaValidatorForm classes.
(org.apache.struts.validator.ValidatorForm,org.apache.struts.validator.DynaValidatorForm)
in this case,
you must give action name instead of form name in your validation.xml file
such as,
formset>
<form name="/yourActionName">
<field property="city"...........
..........................
you must use second way, take it easy..
-----Original Message-----
From: jgfa92004 [mailto:[EMAIL PROTECTED]
Sent: Friday, January 14, 2005 1:11 PM
To: [email protected]
Subject: Different validations for one form
Hi everybody,
Here is my problem : I have two jsp that share the same action class
(and the same form). As they don't contain the same fields, I would
like to have two different validations : one for each jsp. I use
Validator and Struts 1.2. How can I do that ?
Thanks in advance.
Julie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]