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:07:00 UTC
DO NOT REPLY [Bug 17622] New: -
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"
Summary: Client-side validation for integer creates no "alert"
Product: Struts
Version: 1.1 RC1
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Validator Framework
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: sditlinger@ebuilt.com
If non-numeric text is entered, users do not get an alert telling them they
entered a non-integer entry. Server-side validation still takes place, so all
is not lost. (Saves it from being a "Critical" bug. :-)
The javascript in the validation.xml for validating integers contains this:
...
if (value.length > 0) {
if (!isAllDigits(value)) {
bValid = false;
} else {...parseInt and other checks... }
...
What it needs to do is something like this:
...
if (value.length > 0) {
if (!isAllDigits(value)) {
fields[i++] = oInteger[x][1];
bValid = false;
} else {...parseInt and other checks... }
...
This is because fields.length is used to determine whether or not an "alert"
should appear. Another possible fix is to just eliminate the call
to "isAllDigits()" and rely on the "parseInt and other checks". None of the
other "validate<NumericType>" javascript funtions use the "isAllDigits()"
function.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org