Thanks for the pointer on the plugin.

My Validation XML file (UploadFile-uploadXls-validation.xml) is as
follows:

<!DOCTYPE validators PUBLIC 
"-//OpenSymphony Group//XWork Validator 1.0.2//EN" 
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>

<validators>
        <!-- @TODO this validation is not being done -->
    <field name="memberId">
        <field-validator type="requiredstring">
            <message key="err.msg.requiredstring"/>
        </field-validator>
    </field>
        
        <field name="xls">
                <field-validator type="fieldexpression">
                        <param name="expression"><![CDATA[xls.length() >
0]]></param>
                        <message key="err.msg.requiredstring"/>
                </field-validator>
        </field>

</validators>

The Action Mapping is as follows:

                <action name="uploadXls" method="upload"
class="actnUpload">
                <interceptor-ref name="basicStack"/>
                        <interceptor-ref name="fileUpload">
                        <param name="allowedTypes">
 
application/vnd.ms-excel,application/x-msexcel,application/ms-excel
                                </param>
                        <param name="maximumSize">
                                1073741824
                                </param>
                </interceptor-ref>
                <result>/uploadComplete.jsp</result>
            <result name="input">/uploadFile.jsp</result>
            <result name="error">/uploadFile.jsp</result>
                </action>
 

-----Original Message-----
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 14, 2007 3:32 PM
To: Struts Users Mailing List
Subject: Re: [S2] Validation

One way to know if the validation is detected by struts is using the
config browser plugin
(http://struts.apache.org/2.x/docs/config-browser-plugin.html),
is the "validation" interceptor being applied to your action? In any
case, posting the action mapping and the class would help.

musachy

On 6/14/07, Hoying, Ken <[EMAIL PROTECTED]> wrote:
>
> I am trying to perform validation using an xml file that follows the 
> format Action-method-validation.xml.  However, it does not appear that

> the validation is being executed.  I am not sure how to debug this to 
> determine why.  Anyone have a good set of steps on how to debug this 
> issue?
>
> Thank you.
>
>
>
> -----------------------------------------
> ***Note:The information contained in this message may be privileged 
> and confidential and protected from disclosure. If the reader of this 
> message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to the intended recipient, you

> are hereby notified that any dissemination, distribution or copying of

> this communication is strictly prohibited. If you have received this 
> communication in error, please notify the Sender immediately by 
> replying to the message and deleting it from your computer. Thank you.

> Premier Inc.




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to