Fix: player password 2~6 digits

This commit is contained in:
2018-10-16 20:38:11 +09:00
parent e6c9dd95f1
commit ede509e250
4 changed files with 77 additions and 19 deletions
+5 -5
View File
@@ -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]{4,6}$/;
this.patternPlayerPW = /^[0-9]{2,6}$/;
}
// maestro
@@ -73,11 +73,11 @@ AccountValidator.prototype.isValidPlayerPW = function(textPW) {
AccountValidator.prototype.messageForInvalidPlayerPW = function(textPW) {
if(textPW.length < Number(AccountValidator.PLAYER_PW_LENGTH_MINIMUM))
return "학생 입장 번호는 " + AccountValidator.PLAYER_PW_LENGTH_MINIMUM + "글자 이상의 숫자로 입력해 주세요.";
return "학생 입장 번호는 " + AccountValidator.PLAYER_PW_LENGTH_MINIMUM + "글자 이상의 숫자로 입력해 주세요.";
else if(textPW.length > Number(AccountValidator.PLAYER_PW_LENGTH_MAXIMUM))
return "학생 입장 번호는 " + AccountValidator.PLAYER_PW_LENGTH_MAXIMUM + "글자 이하의 숫자로 입력해 주세요.";
return "학생 입장 번호는 " + AccountValidator.PLAYER_PW_LENGTH_MAXIMUM + "글자 이하의 숫자로 입력해 주세요.";
else
return "학생 입장 번호는 4~6자리 숫자로 입력해 주세요.";
return "학생 입장 번호는 2~6자리 숫자로 입력해 주세요.";
}
@@ -91,5 +91,5 @@ AccountValidator.MAESTRO_PW_LENGTH_MAXIMUM = 16;
AccountValidator.PLAYER_ID_LENGTH_MINIMUM = 1;
AccountValidator.PLAYER_ID_LENGTH_MAXIMUM = 8;
AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 4;
AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 2;
AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 6;