public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
{
ActionErrors errors = new ActionErrors();
if((checkbox!=null)){
if((text1==null) || (text1.equals(""))){
errors.add("text1", new ActionError("error.text1.required"));}
}
return errors;
}
Hope this may help you
Cheers
Raman Garg , Gary
[EMAIL PROTECTED]
[EMAIL PROTECTED]
----- Original Message -----
From: "sairam manda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 12, 2003 3:14 PM
Subject: validation
> Hello Sir,
> I am new to struts .I have a question in validating a form . My form has a
> checkbox and few textfields corresponding to the checkbox ie I want to
> validate these textfeilds only if the checkbox is checked .
> Can anybody guide me how I can do this using requiredIf validation.
> regards
> sairam
>
> _________________________________________________________________
> Express your Digital Self. Win fabulous prizes.
> http://www.msn.co.in/DigitalSelf/ Enter this cool contest.
>
>
> ---------------------------------------------------------------------
> 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]