From d2c8ceeb4ea7602758b163d99ecc58ffda61f811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 18 Oct 2018 17:26:36 +0900 Subject: [PATCH] Fix: player entercode 2~8 digits --- src/web/js/lib/account_validator.js | 4 ++-- src/web/module/maestro_section_add_player.html | 2 +- src/web/server/player/login.php | 4 ++-- src/web/sql/make_db.sql | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/web/js/lib/account_validator.js b/src/web/js/lib/account_validator.js index 0c71d20..00cf76b 100644 --- a/src/web/js/lib/account_validator.js +++ b/src/web/js/lib/account_validator.js @@ -3,7 +3,7 @@ function AccountValidator() { this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/; this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/; - this.patternPlayerPW = /^[0-9]{2,6}$/; + this.patternPlayerPW = /^[0-9]{2,8}$/; } // maestro @@ -92,4 +92,4 @@ AccountValidator.PLAYER_ID_LENGTH_MINIMUM = 1; AccountValidator.PLAYER_ID_LENGTH_MAXIMUM = 8; AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 2; -AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 6; \ No newline at end of file +AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 8; \ No newline at end of file diff --git a/src/web/module/maestro_section_add_player.html b/src/web/module/maestro_section_add_player.html index 53f7a96..f510dcb 100644 --- a/src/web/module/maestro_section_add_player.html +++ b/src/web/module/maestro_section_add_player.html @@ -99,7 +99,7 @@ function onErrorPlayerPW(message) {
- 2~6자리의 숫자 + 2~8자리의 숫자
diff --git a/src/web/server/player/login.php b/src/web/server/player/login.php index 00c521e..9dfd3ce 100644 --- a/src/web/server/player/login.php +++ b/src/web/server/player/login.php @@ -14,8 +14,8 @@ if($enterCode === "" || strlen($enterCode) < 2) { exit; } -if(strlen($enterCode) > 6) { - set_error_message("입장번호는 6개 이gk의 숫자로 입력해야 합니다."); +if(strlen($enterCode) > 8) { + set_error_message("입장번호는 8개 이하의 숫자로 입력해야 합니다."); send_result_fail(); exit; } diff --git a/src/web/sql/make_db.sql b/src/web/sql/make_db.sql index 4417ed3..8dab03e 100644 --- a/src/web/sql/make_db.sql +++ b/src/web/sql/make_db.sql @@ -35,7 +35,7 @@ CREATE TABLE player ( PlayerID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, MaestroID INT UNSIGNED NOT NULL, Name CHAR(50) NOT NULL, - EnterCode CHAR(6) NOT NULL, + EnterCode CHAR(8) NOT NULL, AccountType INT UNSIGNED NOT NULL, FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID)