What version are you using? I am helping someone at the moment with the same problem, could possibly be a bug in your version.
-----Original Message----- From: Jan Fetyko [mailto:[EMAIL PROTECTED]] Sent: Friday, 23 August 2002 9:45 PM To: Struts Users Mailing List Subject: Re: Dynamic validation and server side validation Well, looks like it's validating now (thank you, party time - almost ), but looks like it's not displaying any error messages. I have an <html:errors/> in my JSP and the key in my ApplicationResources.properties file. Should that key be somewhere else ? J Zimmer, Robin (SSABSA) wrote: > You need to use either org.apache.struts.validator.DynaValidatorActionForm > or org.apache.struts.validator.DynaValidatorForm depding on whether you want > to validate the form bean or the action. If you validate the action, you > must set the path as the name in the validation.xml file eg: > > <!-- This will validate doSomething action--> > <form name="/doSomethingPath"> > > <!-- Date of Birth --> > <field property="birth" depends="date"> > <arg0 key="prompt.birth"/> > </field> > > </form> > > if you validate the form, you supply the form name. eg: > > <!-- This will validate someForm bean --> > <form name="someForm"> > > <!-- Date of Birth --> > <field property="birth" depends="date"> > <arg0 key="prompt.birth"/> > </field> > > </form> > > Plus of course you need the plugin stuff in you config file: > > <!-- ========== Plugin Definitions > ====================================== --> > <!-- Add multiple validator resource files by setting the pathname > property --> > <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> > <set-property property="pathname" > value="/WEB-INF/validator-rules.xml"/> > <set-property property="pathname" value="/WEB-INF/validation.xml"/> > </plug-in> > > Best of luck. Let me know if it doesn't work. > > -----Original Message----- > From: Jan Fetyko [mailto:[EMAIL PROTECTED]] > Sent: Friday, 23 August 2002 5:59 AM > To: struts > Subject: Dynamic validation and server side validation > > > Hi all, > > I'm just getting to know the DynaActionForm and trying to use it on one > form I have, it looks like that it's generationg the JavaScript to > validate the form in the browser, but the server side validation doesn't > work for some reason. > > What am I doing wrong ? > > Jf > > > Some config files "cuts": > > struts-config.xml > > <form-bean name="NewDealerForm" > type="org.apache.struts.action.DynaActionForm" > dynamic="true"> > <form-property name="bussinessName" type="java.lang.String"/> > </form-bean> > > <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 > > > > <formset> > > <!-- An example form --> > <form name="NewDealerForm"> > <field > property="bussinessName" > depends="required"> > <arg0 key="errors.generic"/> > </field> > </form> > > </formset> > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>