From 44814144e93d5f831e94d5c474c147ee2b4820d8 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Wed, 8 Feb 2017 20:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=B8=8B=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E6=AD=A3=E5=88=99=E8=A1=A8=E8=BE=BE=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/login-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/controllers/login-controller.js b/public/scripts/controllers/login-controller.js index b3b907a..7cf30cf 100644 --- a/public/scripts/controllers/login-controller.js +++ b/public/scripts/controllers/login-controller.js @@ -82,7 +82,7 @@ app.controller('loginCtr', ['$scope', '$filter', '$state', '$cookieStore', 'book $scope.passwordRegister2 = ""; return; } - if (!/([0-9a-zA-Z]){3,12}/.test($scope.usernameRegister)) { + if (!/^[A-Za-z0-9]{3,12}$/.test($scope.usernameRegister)) { toastr.error('账号只能是数字字母,且长度必须为3到12位', "错误"); return; }