You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by MOHAN RADHAKRISHNAN <mr...@cellexchange.com> on 2004/03/05 12:33:44 UTC
Validator doubt
Hi
My validator only works for 'required' fields. Eventhough I have the
following in the same XML it is not working. Is this right ? My
configuration is right because the same validator works for 'required'
fields.
<field
property="cocNumber"
depends="integer">
<msg name="integer" key="error.coc.check"/>
<arg0 key="label.coc.incident"/>
</field>
So if I input a value that is not a integer in this particular field I
should see a message specified by <msg name="integer"
key="error.coc.check"/>
Thanks
Mohan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Validator doubt
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 03/05/2004 12:33 PM MOHAN RADHAKRISHNAN wrote:
>
> <field
> property="cocNumber"
> depends="integer">
> <msg name="integer" key="error.coc.check"/>
> <arg0 key="label.coc.incident"/>
> </field>
>
> So if I input a value that is not a integer in this particular field I
> should see a message specified by <msg name="integer"
> key="error.coc.check"/>
Why are specifying a different msg key? There is a default one already
'errors.integer', if you have put it in your ApplicationResources.
Adam
--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org