There isn't any way to do this. Also if there was a way theres a
danger that by re-displaying what the user keys in you could be
opening your app up to an XSS vulnerability:

http://wiki.apache.org/struts/StrutsXssVulnerability

Niall

On 8/25/06, Robert Harrison <[EMAIL PROTECTED]> wrote:
 I can't find an example of how to insert an invalid credit card number into
the error message "errors.creditcard={0} is an invalid credit card number".

I'm using Struts 1.2.8

Here's my validation.xml snippet:
<field property="ccnum" depends="required, creditCard">
<var>
<var-name>cCard</var-name>
<var-value>${ccnum}</var-value>
</var>
<arg position="0" name="required" key="errors.creditCard.number" />
<arg key="${var:cCard}" name="creditCard" resource="false" position="0" />
</field>

With the above snippet, the error message produced is:
"${ccnum} is an invalid credit card number."

Can someone give me an example of how to pass the "ccnum" to arg0?

Thanks,
Bob

--
"In theory there is no difference between theory and practice. In practice
there is."
Yogi Berra



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

Reply via email to