• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

validate integer works but double doesn't

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody found the strange thing? struts validator works fine with integer, but not work with double in the same page. No error at all, just doesn't validate double.

Here is the code in validation.xml (I double checked the case, spell,...). I am stuck here!!
---------------------

<field property="match_msnum"
depends="integer">
<arg0 key="prompt.match_msnum"/>
</field>

<field property="matchedPrMW"
depends="double">
<arg0 key="prompt.matchedPrMW"/>
</field>
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Odds are, the property is not correct. Check the spelling and case.
 
wayne xu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marc, thanks for looking into it,

When I add "required, depends="required,double", only the rquired is validated on client-side, I can input none double characters with no error msg appears. (But I saw server-side validation msg saying required double this time). This also means there is no mistakes in case, spell.

The depends="required, integer" validate both required and integer on client-side.

So why the double can not be validated on client-side?

Surprisingly, I saw many validation functions such as maxlength, integer,...on my jsp page source view, but I couldn't see the double, validwhen function.

Wayne
--
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having the same problem now. Did you ever find a solution or what's causing this?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic