I have a form that is not displaying validation errors like it should be.
The errors are there in the validationErrors array so the model is
validating, I'm sure of that.
I've been reading through a few other threads on the same subject but none
of the causes seem to apply.
I have the controller and the model stripped down to next to nothing.
[controller]
function add()
{
if(!empty($this->data))
{
$this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
$this->ProfileAttrib->save($this->data);
}
}
[/controller]
Then in the model I validate field 'gender'
[model]
class ProfileAttrib extends AppModel
{
var $name = 'ProfileAttrib';
var $validate = array(
'gender' => array(
'rule' => 'notEmpty',
'message' => 'Message here'
)
);
}
[/model]
I also stripped down the view to just a form and a single field for gender.
Whatever the reason is that validation messages aren't displaying I'm really
not seeing it.
I can't strip things down any more than what they are now.
Any advice?
- Ed
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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