Closed SherriAlexander closed 11 years ago
Please post a test case on jsfiddle.net
Tested in IE8, Firefox, Safari, Chrome. Also, h5Validate passes all the existing tests in IE8 - IE10, Firefox, Chrome, Safari, and Android.
If you're still convinced this is an issue, please provide the specific browser and a test case on http://tinker.io verifying that it doesn't work.
Sorry for the delayed response -- I was out on a family vacation without a laptop. I will see what I can put together for you by end of day tomorrow. Thanks!
Ah -- it seems that the behavior is only happening when using jQuery version 1.4 along with h5Validate 0.9.0, which is the combination that we're using on this particular legacy website (which depends on some very old jQuery plugins).
Looks like the problem goes away once you get up to jQuery version 1.6.x.
Sorry to bother you with this (as older versions of jQuery aren't within your control) -- but at least hopefully this thread will be useful to anyone else running into a similar problem developing for a legacy site with older versions of jQuery. Thank you for your time!
--Sherri
1.4 is going way back. My recommendation is to figure out a way to get them on a newer version of jQuery, instead of clinging to the past.
If you have a textarea (which is not marked "required") and that does not have a maxlength assigned, the script evaluates it as non-valid if you do not enter any text into that textarea. This effectively forces you to specify a maxlength if you want the textarea to validate properly (which is an okay workaround, but not optimal).
So for example, if you have a textarea defined like so:
and you tab out of it without filling anything in, the script evaluates it as non-valid.
Add a maxlength value (of 5000, let's say), and it evaluates correctly if you don't add any text to the textarea and tab out.