struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17622] - Client-side validation for integer creates no "alert"
Date Tue, 04 Mar 2003 00:21:34 GMT
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


Mime
View raw message