码迷,mamicode.com
首页 > 其他好文 > 详细

YII2 rule exist unique

时间:2017-02-19 19:58:08      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:sage   pass   get   使用   pat   getc   pattern   mod   mode   

[‘mobile‘, ‘exist‘, ‘targetClass‘ => ‘xmobile\modules\v1\models\BuyerList‘, ‘message‘ => ‘当前用户不存在‘,‘on‘=>[‘forgetpassword‘]],

[‘mobile‘, ‘unique‘, ‘targetClass‘=>‘xmobile\modules\v1\models\BuyerList‘,‘message‘ => ‘此用户名已经被使用‘,‘on‘=>[‘Inserbuyer‘]],

[[‘password‘],‘match‘,‘pattern‘=>‘/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,12}$/‘,‘message‘ => ‘密码是字母和数字组成‘],

[[‘company‘],‘match‘,‘pattern‘=>‘/^[\x{4e00}-\x{9fa5}A-Za-z0-9]+$/u‘,‘message‘=>‘公司名称必须是中文 字母 数字‘],

YII2 rule exist unique

标签:sage   pass   get   使用   pat   getc   pattern   mod   mode   

原文地址:http://www.cnblogs.com/yangyuqiu/p/6416717.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!