Fix: html bugs
This commit is contained in:
@@ -4,9 +4,12 @@ function AccountValidator() {
|
||||
|
||||
this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/;
|
||||
this.patternPlayerPW = /^[0-9]{2,8}$/;
|
||||
|
||||
this.patternLicenseTimerPW = /^[0-9]{2,8}$/;
|
||||
}
|
||||
|
||||
// maestro
|
||||
|
||||
// maestro ID
|
||||
AccountValidator.prototype.isValidMaestroID = function(textID) {
|
||||
if(!this.patternMaestroID.test(textID))
|
||||
return false;
|
||||
@@ -26,6 +29,7 @@ AccountValidator.prototype.messageForInvalidMaestroID = function(textID) {
|
||||
}
|
||||
|
||||
|
||||
// maestro password
|
||||
AccountValidator.prototype.isValidMaestroPW = function(textPW) {
|
||||
if(!this.patternMaestroPW.test(textPW))
|
||||
return false;
|
||||
@@ -46,7 +50,7 @@ AccountValidator.prototype.messageForInvalidMaestroPW = function(textPW) {
|
||||
}
|
||||
|
||||
|
||||
// player
|
||||
// player ID
|
||||
AccountValidator.prototype.isValidPlayerID = function(textID) {
|
||||
if(!this.patternPlayerID.test(textID))
|
||||
return false;
|
||||
@@ -64,6 +68,7 @@ AccountValidator.prototype.messageForInvalidPlayerID = function(textID) {
|
||||
}
|
||||
|
||||
|
||||
// player password
|
||||
AccountValidator.prototype.isValidPlayerPW = function(textPW) {
|
||||
if(!this.patternPlayerPW.test(textPW))
|
||||
return false;
|
||||
@@ -81,6 +86,26 @@ AccountValidator.prototype.messageForInvalidPlayerPW = function(textPW) {
|
||||
}
|
||||
|
||||
|
||||
// license timer maestro password
|
||||
AccountValidator.prototype.isValidLicenseTimerPassword = function(textID) {
|
||||
if(!this.patternLicenseTimerPW.test(textID))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
AccountValidator.prototype.messageForInvalidLicenseTimerPassword = function(textID) {
|
||||
if(textID.length < AccountValidator.LICENSE_TIMER_PW_LENGTH_MINIMUM)
|
||||
return "자격증 타이머의 비밀번호는 " + AccountValidator.LICENSE_TIMER_PW_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
||||
else if(textID.length > AccountValidator.LICENSE_TIMER_PW_LENGTH_MAXIMUM)
|
||||
return "자격증 타이머의 비밀번호는 " + AccountValidator.LICENSE_TIMER_PW_LENGTH_MAXIMUM + "글자 이하이어야 합니다.";
|
||||
else
|
||||
return "자격증 타이머의 비밀번호는 2~8자리 숫자로 입력해 주세요.";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AccountValidator.MAESTRO_ID_LENGTH_MINIMUM = 4;
|
||||
AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM = 20;
|
||||
|
||||
@@ -92,4 +117,7 @@ AccountValidator.PLAYER_ID_LENGTH_MINIMUM = 1;
|
||||
AccountValidator.PLAYER_ID_LENGTH_MAXIMUM = 8;
|
||||
|
||||
AccountValidator.PLAYER_PW_LENGTH_MINIMUM = 2;
|
||||
AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 8;
|
||||
AccountValidator.PLAYER_PW_LENGTH_MAXIMUM = 8;
|
||||
|
||||
AccountValidator.LICENSE_TIMER_PW_LENGTH_MINIMUM = 2;
|
||||
AccountValidator.LICENSE_TIMER_PW_LENGTH_MAXIMUM = 8;
|
||||
Reference in New Issue
Block a user