Form.Validator.add('validate-at-least-one-required', {
errorMsg: 'At least one field is required',
test: function(element, value){
if (element.value.length == 0 && value['validate-at-least-one-required'].value.length == 0) return false;
else return true;
}
});
using it like that :
<li><textarea id="positifComment" name="positif_comment" class="validate-at-least-one-required:negatifComment" rows="5" cols="30"></textarea></li>
<li><textarea id="negatifComment" name="negatif_comment" class="validate-at-least-one-required:positifComment"rows="5" cols="30"></textarea></li>
But what you showed seems to be exactly what i needed :)
Thanks,
Olivier.