密码必须6-15位数字与字母组合

master
tpingzhang 5 years ago
parent a538694417
commit 24cd29761a

@ -832,12 +832,15 @@ class UserController extends BaseController
#实例化用户接口
$userApi = new MemberApi();
if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){
/* if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){
$this -> set_message(1027, "fail", "账号必须6-15位数字或字母组合");
} */
if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['account'])){
$this -> set_message(1027, "fail", "账号必须6-15位数字与字母组合");
}
if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){
$this -> set_message(1027, "fail", "密码必须6-15位数字字母组合");
$this -> set_message(1027, "fail", "密码必须6-15位数字字母组合");
}
// user表加game_id
if ($type == 2) {//手机2

Loading…
Cancel
Save