File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validate integer fails for zero values

 
Velika Srbija
Ranch Hand
Posts: 172
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my validation.xml I have an entry:
...
<field property="id_article" depends="required,integer" >
<arg0 key="app.validator.error.id_article"/>
</field>
...

Everything works OK unless I enter 0 (zero) into "id_article" text field on my JSP. In that case JavaScript alerts a message saying 0 is not an integer.

I know there was a problem with parseInt() function in JavaScript 1.0, but I'm using IE6 and JavaScript1.1.

What is goin' on?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic