开发者

validate email does not work cakephp

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜