Class Myprofile extends AppModel{
var $name ='Myprofile';
var $primaryKey = 'myprofileid';
var $validate = array(
'name'=> array(
'rule'=>'notEmpty',
'message'=>'Please Enter name'
),
'email'=&g开发者_运维技巧t; array(
'please enter your email'=>array(
'rule'=>'notEmpty',
'message'=>'please Enter your email'
)
),
'email does not correct format' => array(
'rule'=>array('email','true'),
'message'=>'email does not correct format'
),
'email'=>array(
'rule'=>'isUnique',
'message'=>'the email already taken'
)
);
the validate format email does not work i follow in book.cakephp.org but doesn't work thank for any suggest
You close the "email" array too early as you can see in the reformatted code.
精彩评论