Fix: MaestroID include korean word, 3+ alphabet count
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
function AccountValidator() {
|
function AccountValidator() {
|
||||||
this.patternMaestroID = /^[A-Za-z가-힣]{1}[A-Za-z0-9가-힣]{3,19}$/;
|
this.patternMaestroID = /^[A-Za-z가-힣]{1}[A-Za-z0-9가-힣]{2,19}$/;
|
||||||
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}$/;
|
||||||
@@ -24,10 +24,10 @@ AccountValidator.prototype.messageForInvalidMaestroID = function(textID) {
|
|||||||
return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MINIMUM + "글자 이상이어야 합니다.";
|
||||||
else if(textID.length > AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM)
|
else if(textID.length > AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM)
|
||||||
return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM + "글자 이하이어야 합니다.";
|
return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM + "글자 이하이어야 합니다.";
|
||||||
else if(!(/^[A-Za-z]/.test(textID)))
|
else if(!(/^[A-Za-z가-힣]/.test(textID)))
|
||||||
return "마에스트로 계정명은 알파벳으로 시작해야 합니다.";
|
return "마에스트로 계정명은 알파벳이나 한글로 시작해야 합니다.";
|
||||||
else if((/[^\w]/g).test(textID))
|
else if(!(/[^[A-Za-z0-9가-힣]]/g).test(textID))
|
||||||
return "마에스트로 계정명은 알파벳과 숫자로만 적어주세요.";
|
return "마에스트로 계정명은 알파벳이나 한글, 숫자로만 적어주세요.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user