A problem about yiiactiveform Ajax Validation

when use yii activeform ajax validataion, the auto generated js code is use inputID for validation, but when I use radiobuttonlist or checkboxlist, the inputID will still be the attribute, but the input’s ID will be ordered form 0 to n, so the jquery can not find the element, the ajax validation will not be triggered.

I noticed that the jquery validation plugin use element’s name for validation, not the ID, I think it is better and logical.

<input value="休闲" id="line_subject_0" type="checkbox" name="line[subject][]" /> <label for="line_subject_0">休闲</label>&nbsp;<input value="滑雪" id="line_subject_1" type="checkbox" name="line[subject][]" /> <label for="line_subject_1">滑雪</label>&nbsp;<input value="避暑" id="line_subject_2" type="checkbox" name="line[subject][]" /> <label for="line_subject_2">避暑</label>&nbsp;<input value="文化游" id="line_subject_3" type="checkbox" name="line[subject][]" /> 

the auto gen js is :


the ID ‘line_subject’ is not exists, so the validation will not be triggered.

Did you find the solution for this problem?

I am having the same problem.

I have a radioButtonList which has two values: "0" and "1".

The ajax validation does not validate it.

Please advise,

This should be fixed in the r3492 - http://code.google.com/p/yii/source/detail?r=3492