You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/03/04 01:21:34 UTC

DO NOT REPLY [Bug 17622] - Client-side validation for integer creates no "alert"

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17622>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17622

Client-side validation for integer creates no "alert"





------- Additional Comments From martinc@apache.org  2003-03-04 00:21 -------
We can't just rely on parseInt(). In fact, isAllDigits() was introduced to fix 
a problem with just using parseInt(), namely that the latter function will stop 
parsing when it reaches a non-digit, rather than claiming that the value is not 
an integer. That is, parseInt("123abc") happily returns 123 as its value, and 
just ignores the "abc" on the end.

However, the first suggestion you describe looks OK, although I haven't had a 
chance to verify the problem or try the proposed solution.

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