YII2 rule exist unique
生活随笔
收集整理的這篇文章主要介紹了
YII2 rule exist unique
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
['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'=>'公司名稱必須是中文 字母 數字'],
轉載于:https://www.cnblogs.com/yangyuqiu/p/6416717.html
總結
以上是生活随笔為你收集整理的YII2 rule exist unique的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 插入节点insertBefore()
- 下一篇: bzoj 1369: Gem 树形dp