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=18018>. 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=18018 requiredif variable names crash javascript validation Summary: requiredif variable names crash javascript validation Product: Struts Version: 1.1 RC1 Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Validator Framework AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Although requiredif is never checked on the client it is not possible to enable client validation on other fields if the form uses requiredif for server-side validation. Mozilla's javascript engine (and presumably IE's because both give the same end behavior) will not allow a variable to be named "field-test" or "field-join". Specifically the bug is in: this.ae = new Array("lastName", "Last Name can not be less than 2 characters.", new Function ("varName", "this.field[0]='firstName'; this.field-test[0]='NOTNULL'; this.minlength=2; return this[varName];")); this is easily proven by typing var field-test = new Array(); into a javascript engine. The only workaround I can see is to rename the variables, allow alternate names or hack JavascriptValidatorTag.java to support a new jsType called "omit" which will omit any variables not used by javascript. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
