Ronald wrote:
Hello Jörn and others,

I may have found 2 bugs in the form validation plugin. But this could
also be due to IE6 and IE7, I am not sure.
The first bug shows up when you add a field (hidden field in my case)
with a name="id". I understand that IE doesnt like that a lot since IE
treats names and ids almost the same (or so I recall reading
somewhere). However I dont understand that when I add a field with a
name of id, the form validation does not work anymore and just submits
everything.

Example is at http://www.competities.com/jquery/demo-test/test_with_id.html.
The second form contains the hidden id. Note that this is the complete
zip file of the form plugin.
Now that is one of those really weird IE bugs. I've checked your example and tried around a bit to see where the problem occurs, but haven't yet found anything useful.
The second bug occurs when I add a button with a name of cancel. Again
there is no form validation, not even when I press the submit button.
Also in IE6 there is no alert (nor a validation) whereas in firefox
there is an alert (but no validation).
Now that isn't half as weird as the other issue. As long as it occurs in Firefox is nearly trivial to fix it. The problem here was some extra code that was supossed to skip validation when a submit button with a class "cancel" was clicked. My mistake was to assign the result an expando named "cancel" to form-element. A check for form.cancel returned true when an element with id "cancel" was present, therefore the presence of that button caused the validation to skip always.

Thanks for your reports. As they are both easy to work around it should be no problem to wait for 1.2, okay? Though I'm not sure I can provide a fix for the first issue.

--
Jörn Zaefferer

http://bassistance.de

Reply via email to