No the field type should be string like all form properties.


On 4 Mar 2004, at 12:39, MOHAN RADHAKRISHNAN wrote:


Thanks.
I was trying to find out why this particular check is not run while
the depends="required" check in the same validation.xml is run.
I can see that this check is not run because it passes control to
the action. My field type in the form that this check applies to is
'String'. Is that a problem ?


Mohan

-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 3:20 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Numeric validator


Your can either display all errors:


<html:errors/>

or errors for a specific property.

<html:errors property="windSpeed"/>

http://jakarta.apache.org/struts/userGuide/struts-html.html#errors


----- Original Message ----- From: "MOHAN RADHAKRISHNAN" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 9:08 AM Subject: Numeric validator


Hi

There are the steps I am following for a numeric check with struts
validator. I don't see the proper message and the check is passing. What
could be the problem ?


validation.xml

         <field
             property="windSpeed"
             depends="integer">
<msg name="integer" key="error.wind.check"/>
                 <arg0 key="label.wind.incident"/>
          </field>

in the properties file.

error.wind.check=Wind speed is a number



in my JSP

  <html:errors/>
  <html:errors property="errors.required"/>

Do I have to use <html:errors property="errors.integer"/>

Help is appreciated.

Mohan


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




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


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



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



Reply via email to