i need help how to develop validation rule for next case...
my cakephp web form contains several dynamically generated checkboxes. end user must select at least one of them.
none of those checkboxes are fields in db table.
can you help me how to create validation rule for that?
tried to do by adding in model something like
var $validate = array(
'topic' => array(
'rule' => 'myRule',
'message' => 'Check on at least one checkbox'
)
)
function myRule() {
//just give me false to know it works...
return false;
}
also, for that case, how to place error message, below those checkboxes?
tnx in adv!