Commit Graph

115 Commits

Author SHA1 Message Date
Eric Naeseth
f2321e1f9f Fixed #177 - Fix validation of a single radio or checkbox input
The validator element() method delegates to check(). When check() is
passed a radio or checkbox input element (call it 'A'), it instead
checks the first element with the same name in the form (call it 'B').

If element B is judged invalid, a bug occurs. Element A will have been
added to the currentElements array, but element B is what is added to
the errorList. So, when showErrors is called, element A will be in
validElements(), and will be unhighlighted.

This is fixed by having element() also change its target to be the
first element of the same name when passed a checkbox or radio input.

Signed-off-by: Eric Naeseth <eric@thumbtack.com>
2011-09-13 15:50:08 +02:00
Haacked
393ccabc07 Fixed issue 78. Error/Valid styling applies to all radio buttons of same group for required validation. 2011-05-05 13:34:23 +02:00
jzaefferer
bb4a84a184 Mock ajax requests to replace .php files (make testsuite run on
gh-pages). Also clean up unnecessary tests for .php files, had several
bugs anyway.
2011-04-24 20:08:55 +02:00
jzaefferer
bd70d9a4f8 Disable QUnit reordering and fix a custom events related issue in test. 2011-02-26 22:06:58 +01:00
jzaefferer
858ca34cf4 Fix elements ordering test. 2011-01-29 12:02:07 +01:00
jzaefferer
10d0d9b15f Fixed the broken testsuite, with an update to current QUnit. A few tests still broken. 2011-01-28 17:15:32 +01:00
jzaefferer
1b464f32b3 Tests and fix for focusCleanup with wrapper 2010-07-14 18:23:08 +02:00
jzaefferer
c466947ebe Tests for focusCleanup option 2010-07-14 18:07:10 +02:00
jzaefferer
5bb2441f04 CRLF conversions 2010-05-05 15:52:04 +02:00
Jörn Zaeffferer
7851551103 Bugfixes for compability with jQuery 1.4.2, while maintaining backwards-compability 2010-03-09 19:38:36 +00:00
Jörn Zaeffferer
7c47463a58 Testsuite bugfixes for compability with jQuery 1.4.2, while maintaining backwards-compability 2010-03-09 18:11:03 +00:00
Jörn Zaeffferer
6ba056b138 Bugfixes for compability with jQuery 1.4.2, while maintaining backwards-compability 2010-03-08 23:31:24 +00:00
Jörn Zaeffferer
ce09691a35 * Added automatic detection of substitution parameters in messages, removing the need to provide format functions (http://plugins.jquery.com/node/11195) 2009-11-30 18:25:47 +00:00
Jörn Zaeffferer
acb5c9226c validate: * Fixed two accidental global variables 2009-09-15 08:07:06 +00:00
Jörn Zaeffferer
ce7c5baa4e 2009-08-01 11:54:55 +00:00