httpp886 2017-02-08 12:54:47 3645次浏览 1条评论 0 0 0
['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'=>'公司名称必须是中文 字母 数字'],

希望对大家有用。on是场景部分。

您需要登录后才可以评论。登录 | 立即注册