Are you extending ValidatorForm? sandeep --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Here's my struts-config and my validation.xml. I've > also attached them, if > it's easier to look at that way. I've only shown > parts of my > struts-config.xml, enough to show one example action > that isn't validating > right. > _______________________ > > Struts-Config snippets: > > <form-beans> > <form-bean name="ansm" > type="com.moog.us.app.ans.data.AnsmItem"/> > <form-bean name="ansa" > type="com.moog.us.app.ans.data.AnsaItem"/> > </form-beans> > > <action path="/AddFormat" > type="com.moog.us.app.ans.action.AddANSM" > validate="true" > name="ansm" > scope="request" > input="tiles.addFormat"/> > > <controller > processorClass="com.moog.us.struts.AppRequestProcessor" > /> > > <message-resources > parameter="ApplicationResources"/> > > <plug-in > className="com.moog.us.struts.AppStartupPlugin"/> > <plug-in > className="org.apache.struts.tiles.TilesPlugin" > > <set-property property="definitions-config" > value="/WEB-INF/tiles-defs.xml" /> > <set-property property="moduleAware" > value="true" /> > <set-property > property="definitions-parser-validate" value="true" > /> > </plug-in> > <plug-in > className="org.apache.struts.validator.ValidatorPlugIn"> > <set-property > property="pathnames" > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > </plug-in> > > _______________________ > > Validation.xml: > > <?xml version="1.0" encoding="ISO-8859-1" ?> > > <!DOCTYPE form-validation PUBLIC > "-//Apache Software Foundation//DTD > Commons Validator Rules > Configuration 1.0//EN" > > "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"> > > <form-validation> > > <global> > </global> > > <formset> > <form name="ansm"> > <field property="numberType" > depends="required"> > <arg0 key="app.label.numberType"/> > </field> > <field property="typeDesc" > depends="required"> > <arg0 key="app.label.numberType"/> > </field> > </form> > </formset> > > </form-validation> > > > > > If I should send any other files, let me know. > Any input would be great, thanks! > > > - Keith > > > > > > > > -----Original Message----- > From: Mick Knutson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 1:32 PM > To: [EMAIL PROTECTED] > Subject: RE: requiredif question > > > I did not see yours. Can you post your code again? > > > > --- > Thanks... > Mick Knutson > --- > > > > > > >From: "Kamholz, Keith (corp-staff) USX" > <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >To: 'Struts Users Mailing List' > <[EMAIL PROTECTED]> > >Subject: RE: requiredif question > >Date: Wed, 25 Jun 2003 13:26:48 -0400 > > > >I'm having a similar problem. All I'm trying to do > is have a 'required' > >condition for 2 fields of my form. Mine submits > just fine when I leave it > >blank as well. I posted my code here yesterday, > but nobody was able to > >help > >me. If you figure this out, I'd appreciate it if > you let me know what the > >problem is. I'll do the same! > > > >- Keith > > > > > >-----Original Message----- > >From: Mick Knutson [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, June 25, 2003 1:26 PM > >To: [EMAIL PROTECTED] > >Subject: Re: requiredif question > > > > > >Yes, no matter what I enter, nothing happends at > all. It just accepts > >whatever I enter, or leave blank, and submits just > fine. > > > > > > > >--- > >Thanks... > >Mick Knutson > >--- > > > > > > > > > > > > >From: Kevin Robair <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > > >To: Struts Users Mailing List > <[EMAIL PROTECTED]> > > >Subject: Re: requiredif question > > >Date: Wed, 25 Jun 2003 10:20:35 -0700 (PDT) > > > > > >Just a hunch: > > > > > >For Struts 1.1RC1 , the varnames should be: > > > > > >field-test[x] > > >field-join > > >etc... > > > > > >In 1.1RC2, they are > > > > > >fieldTest[n] > > >fieldJoin > > >etc.... > > > > > >BTW, I am unsure what you mean by: > > > > > > "does not seem to operate at all" > > > > > >Are there any errors or exceptions in the log? If > the form validates no > > >matter what you enter, and there are no errors in > the log, then it is > > >possibly a configuration problem. You could try a > simpler validation, in > > >place of this one just to make sure it is doing > something. Then, remove > > >the NOTNULL check, and see if the NOTEQUAL alone > works. > > > > > >-Kevin > > > > > >--- Mick Knutson <[EMAIL PROTECTED]> wrote: > > > > I have the following code that does not seem > to operate at all. > > > > > > > > I want phone1type to be a required field _if_ > the phone1 attribute is > > > > _not_ > > > > "" > > > > > > > > <field property="phone1type" > > > > depends="requiredif"> > > > > <arg0 key="form.phone1type"/> > > > > <var> > > > > > <var-name>field[0]</var-name> > > > > > <var-value>phone1</var-value> > > > > </var> > > > > <var> > > > > > <var-name>fieldTest[0]</var-name> > > > > > <var-value>NOTNULL</var-value> > > > > </var> > > > > <var> > > > > > <var-name>field[1]</var-name> > > > > > <var-value>phone1</var-value> > > > > </var> > > > > <var> > > > > > <var-name>fieldTest[1]</var-name> > > > > > <var-value>NOTEQUAL</var-value> > > > > </var> > > > > <var> > > > > > <var-name>fieldValue[1]</var-name> > > > > <var-value> </var-value> > > > > </var> > > > > <var> > > > > > <var-name>fieldJoin</var-name> > > > > <var-value>OR</var-value> > > > > </var> > > > > </field> > > > > > > > > > > > > > > > > > > > > --- > > > > Thanks... > > > > Mick Knutson > > > > --- > > > > > > > > > _________________________________________________________________ > > > > Tired of spam? Get advanced junk mail > protection with MSN 8. > > > > http://join.msn.com/?page=features/junkmail > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > 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] > > > > > > >_________________________________________________________________ > >Tired of spam? Get advanced junk mail protection > with MSN 8. > >http://join.msn.com/?page=features/junkmail > > > > > >--------------------------------------------------------------------- > >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] > > > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months > FREE*. > http://join.msn.com/?page=features/featuredemail > > > --------------------------------------------------------------------- > 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] >
__________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]