Fix: player entercode 2~8 digits
This commit is contained in:
@@ -3,7 +3,7 @@ function AccountValidator() {
|
|||||||
this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/;
|
this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/;
|
||||||
|
|
||||||
this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/;
|
this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/;
|
||||||
this.patternPlayerPW = /^[0-9]{2,6}$/;
|
this.patternPlayerPW = /^[0-9]{2,8}$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
// maestro
|
// maestro
|
||||||
@@ -92,4 +92,4 @@ AccountValidator.PLAYER_ID_LENGTH_MINIMUM = 1;
|
|||||||
AccountValidator.PLAYER_ID_LENGTH_MAXIMUM = 8;
|
AccountValidator.PLAYER_ID_LENGTH_MAXIMUM = 8;
|
||||||
|
|
||||||
AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 2;
|
AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 2;
|
||||||
AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 6;
|
AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 8;
|
||||||
@@ -99,7 +99,7 @@ function onErrorPlayerPW(message) {
|
|||||||
<label for="entercode" class="col-sm-3 col-form-label">입장 번호</label>
|
<label for="entercode" class="col-sm-3 col-form-label">입장 번호</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control col-sm-9" id="entercode" placeholder="입장 번호 입력">
|
<input type="text" class="form-control col-sm-9" id="entercode" placeholder="입장 번호 입력">
|
||||||
<small class="form-text text-muted">2~6자리의 숫자</small>
|
<small class="form-text text-muted">2~8자리의 숫자</small>
|
||||||
<button type="button" class="col-sm-7 btn btn-primary btn-lg mt-3" onClick="addPlayer()">추가</button>
|
<button type="button" class="col-sm-7 btn btn-primary btn-lg mt-3" onClick="addPlayer()">추가</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ if($enterCode === "" || strlen($enterCode) < 2) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen($enterCode) > 6) {
|
if(strlen($enterCode) > 8) {
|
||||||
set_error_message("입장번호는 6개 이gk의 숫자로 입력해야 합니다.");
|
set_error_message("입장번호는 8개 이하의 숫자로 입력해야 합니다.");
|
||||||
send_result_fail();
|
send_result_fail();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ CREATE TABLE player (
|
|||||||
PlayerID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
PlayerID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
MaestroID INT UNSIGNED NOT NULL,
|
MaestroID INT UNSIGNED NOT NULL,
|
||||||
Name CHAR(50) NOT NULL,
|
Name CHAR(50) NOT NULL,
|
||||||
EnterCode CHAR(6) NOT NULL,
|
EnterCode CHAR(8) NOT NULL,
|
||||||
AccountType INT UNSIGNED NOT NULL,
|
AccountType INT UNSIGNED NOT NULL,
|
||||||
|
|
||||||
FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID)
|
FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID)
|
||||||
|
|||||||
Reference in New Issue
Block a user