[TYPO3-core] Bug #1578: Radio button validation does not work ifthere is only one radio button

Martin Kutschker Martin.Kutschker at blackbox.net
Fri Dec 16 18:58:27 CET 2005


Sebastian Kurfuerst <sebastian at garbage-group.de> writes on 
Sun, 27 Nov 2005 15:21:43 +0100 (MET):

> This is a CVS patch request.
> 
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=1578
> 
> Type:
> Bugfix
> 
> Branches:
> HEAD
> 
> User writes:
> validateForm() will not correctly validate radio buttons if there is
> only one radio button in a group. This is because fObj.length
> (t3lib/jsfunc.validateform.js line 87) is undefined in this case, and
> therefore the validation loop is never entered and "value" remains
> undefined.


Works fine with newer browsers. Should be safe anyway. Either lenght is 1, then the loop is ok, or it's undefined (or 0) then we can check for checked directly.

+1, but could you please, while you're at it, rename the var "l" into "len"? I read "if (1)" (digit one) instead of "if (l)" (small letter L).

Masi 



More information about the TYPO3-team-core mailing list