#63 same validation msg be returned for different errors

open
nobody
None
5
2004-08-17
2004-08-17
Anonymous
No

I'm using Struts Validator. I have multiple validations for
a single form. No matter which error occurs, I keep
getting the same error msg which is whichever one I
define first in validation.xml.

Here is the top of the form validation:

<form name="/PaymentInquirySubmitAction">
<field property="paymentDueDate"
depends="required,date">
<msg name="required" key="20028"
resource="true"/>
<msg name="date" key="4006"
resource="true"/>
</field>
<field property="reasonForInquiry"
depends="noPreviousError,intRange">
<msg name="intRange" key="20008"
resource="true"/>
<var>
<var-name>min</var-name>
<var-value>0</var-value>
</var>
<var>
<var-name>max</var-name>
<var-value>5</var-value>
</var>
</field>

So if I enter a well formed date and reasonForInquiry
that is out of range I still am receiving error 20028. It
fully depends on which key I define first as I have put
4006 first and all error messages return as 4006.

verifyActionErrors(new String[] {"4006"});

I am using Struts 1.1 and StrutsTestCase 2.1.2

Thanks, Tom

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks