开发者

validate email does not work cakephp

开发者 https://www.devze.com 2023-03-04 13:07 出处:网络
Class Myprofile extends AppModel{ var $name =\'Myprofile\'; var $primaryKey = \'myprofileid\'; var $validate = array(
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

精彩评论

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

关注公众号