Hello Jeremy and Doctor Yee-

-we need to see your validator-rules.xml
-need to see your Form declaration in struts-config.xml specifically 
<form-beans>  <form-bean 
-the validation.xml should have a minimum 2 differing action paths as provided 
in the example located here
http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html

HTH
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Yee, Richard K CTR DMDC" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Thursday, July 20, 2006 9:14 AM
Subject: RE: pb using validator it does not work !


> What class is your sapinscription.form.StartSubscriptionForm extending?
> 
> -Richard
> 
> 
> -----Original Message-----
> From: Jeremy Jardin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 20, 2006 3:05 AM
> To: user@struts.apache.org
> Subject: pb using validator it does not work !
> 
> Hi,
> 
> I'm trying to use validator plugin in my application, and it does not work
> at all !
> 
> First, I've just add <html:errors/> in my jsp.
> 
> I've written a basic validation.xml file like this :
> <form name="StartSubscriptionForm">
>    <field property="name" depends="required">
>        <arg0 key="inscription.nom"/>
>    </field>
> </form>
> 
> Then, I've also a classic validation-rules.xml file, with usefull rules.
> Thoses files are un my WEB-INF directory.
> 
> I added in my struts-config.xml fil those lines :
> 
>   <form-beans>
>  <form-bean name="StartSubscriptionForm" type="
> sapinscription.form.StartSubscriptionForm"/>
> 
>    </form-beans>
> 
>  <!-- ========== Action Mapping Definitions ==============================
> -->
>  <action-mappings>
> 
>    <action    path      = "/StartSubscription"
>               type      = "sapinscription.action.StartSubscriptionAction"
>               name      = "StartSubscriptionForm"
>               scope     = "session"
>               validate  = "true"
>               input     = "/jsp/inscriptionForm.jsp"
>      >
>        <forward name="subscribingPage" path="/jsp/inscriptionForm.jsp" />
>     </action>
> 
>    </action-mappings>
> 
>  <message-resources null="false" parameter="conf.WebMessages"/>
> 
> <!-- ============== Validator plugin
> ======================================-->
> 
>  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
>    <set-property
>        property="/StartSubscription"
>        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
>  </plug-in>
> 
> 
> It seems to be all right.. but when I submit my form, Action class runs.. as
> if validation were ok.. even if I do not fill "name" field in my form?
> 
> I guess there's something wrong.. but I don't know where ?
> 
> Help please !
> 
> -- 
> ~ jebmail ~
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to