sairam,
If u r using struts 1.1 then u can find a zip file called
"struts-example.zip" else download the struts 1.1
Unzip the file & u can find an example on validating ur form at
"struts-example\WEB-INF\src\java\examples\validator"
-- Kri$hn@
-------------------------------------------------------------------------
*: bus: [EMAIL PROTECTED] *: +1 (314) 331 - 9897
*: per: [EMAIL PROTECTED] *: +1 (925) 864 - 0012
-----Original Message-----
From: sairam manda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:57 AM
To: [EMAIL PROTECTED]
Subject: Re: validation
Hello Sir,
Thank you for the reply but Iam looking to use t he
requiredIf validator .
regards
sairam
>From: "Garg Raman \(SDinc\)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: validation Date: Wed, 12 Nov 2003 15:23:50 +0530
>
>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]
>
_________________________________________________________________
Find your first love. Rekindle past joys! http://www.batchmates.com/msn.asp
Get in touch with batchmates.
---------------------------------------------------------------------
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]