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

http://issues.apache.org/bugzilla/show_bug.cgi?id=32760





------- Additional Comments From [EMAIL PROTECTED]  2004-12-21 00:00 -------
I looked into this a bit more deeply. Bryan - the workaround is going to be the
second one I mentioned, break up the creditCard and validWhen validations into
two separate <field property=...> statements.

Overall, I'm not sure whether this should be filed under Struts (as it
originally was) or under Commons Validator (which I initially re-assigned it
to). The reason for this confusion is that while the bug presents itself in the
Struts Javascript code, I think the fix is going to have to be a change to
Commons Validator.

The problem is that <var> elements in a field don't get assigned to a specific
validation method. When the javascript is printed out, each Javascript
validation for the field (required, creditCard, int, etc.) print out the <var>
contents along with the standard Javascript stuff. 

I would imagine the reason this doesn't present itself very often is people
don't usually use validWhen in conjunction with other (js-enabled) validators. 

All other validations that require <vars> have JS versions, so when the <var>
data gets printed in another fields validation (for example: the required
validation JS contains <var> data for a mask validation) it is already JS safe.

The ultimate fix I think will be to allow the <var> element to contain an
attribute that specifies which validation method(s) it applies to, for example:

<var forValidation="validwhen">
  <var-name>bla</var-name>
...

or even:
<var forValidation="validwhen,otherValidation">
...
(which is less likely but still possible...)

Perhaps Niall's new validator proposal in bug 32343 deals with this? I don't
have time to look now, but I will try to in the next few days.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to