You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jean-Marie Pitre <jm...@cofisun.com> on 2006/08/22 12:07:50 UTC

Validator html args

Hi,

I am using Validator 1.3, I would like to know if I can pass argument
value issued from html element?

I explain me:

I have an html form :

...
<font id="labeluser" class="test">User</font>
<html:text property="userid"/>
...

My validation looks like this:

<form name="Identification">
<field property="uti_userid" depends="required">
<arg key="user.label" position="0"/>
</field>

Do you know if there a mean to display the labeluser (font id) instead
of putting value in a resource bundle?

Thanks,

Regards,
Jean-Marie. 

-------------------
Email Disclaimer
http://www.cofidis.be/emaildisclaimer.php


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Validator html args

Posted by Niall Pemberton <ni...@gmail.com>.
Theres no way of picking up what was rendered in your view in the
validation config.

If you're "hard coding" your label values rather than putting them in
the message resources though, you can do the same in your
validation.xml - using the resource="false" attribute.

  <arg key="User" position="0" resource="false"/>

... or even the whole error message.

Niall

On 8/22/06, Jean-Marie Pitre <jm...@cofisun.com> wrote:
>
> Hi,
>
> I am using Validator 1.3, I would like to know if I can pass argument
> value issued from html element?
>
> I explain me:
>
> I have an html form :
>
> ...
> <font id="labeluser" class="test">User</font>
> <html:text property="userid"/>
> ...
>
> My validation looks like this:
>
> <form name="Identification">
> <field property="uti_userid" depends="required">
> <arg key="user.label" position="0"/>
> </field>
>
> Do you know if there a mean to display the labeluser (font id) instead
> of putting value in a resource bundle?
>
> Thanks,
>
> Regards,
> Jean-Marie.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org