The following: Cant figure out why validation not working... This is what i have; In my model 'User': <?php class User extends AppModel{ var $name = 'User'; var $useTable = 'clients';
var $validate = array( 'name' => array(array('rule' => array('minLength', 3),'message'=>'No name'))); function beforeValidate(){ if(!isset($this->data['User']['gender'])){ $this->invalidate('gender', 'No gender selected'); return false; } return true; } ?> In my view: <?php echo $html->radio('User/gender', array('m', 'v'), '?');?> <?php echo $html->tagErrorMsg('User/gender', 'No gender selected....'); ?> But no errors are displayed.... When I do this in my controller: pr($this); There is an array : [validationErrors] => Array( [gender] => No gender selected ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---