diff --git a/src/web/js/lib/account_validator.js b/src/web/js/lib/account_validator.js index 00cf76b..842b48e 100644 --- a/src/web/js/lib/account_validator.js +++ b/src/web/js/lib/account_validator.js @@ -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 "학생 입장 번호는 2~6자리 숫자로 입력해 주세요."; + return "학생 입장 번호는 2~8자리 숫자로 입력해 주세요."; } diff --git a/src/web/js/player_list_manager.js b/src/web/js/player_list_manager.js index eeb1749..4307be8 100644 --- a/src/web/js/player_list_manager.js +++ b/src/web/js/player_list_manager.js @@ -149,11 +149,26 @@ PlayerListManager.prototype.editPlayer = function(inputButton) { var name = $(inputButton).siblings(".player_name"); var playerName = name.val(); - // console.log(playerName); + console.log(playerName); var enterCode = $(inputButton).siblings(".player_entercode"); var playerEnterCode = enterCode.val(); - // console.log(playerEnterCode); + console.log(playerEnterCode); + + if(!accountValidator.isValidPlayerID(playerName)) { + // console.log("Error - playerName : " + playerName); + onErrorPlayerName(accountValidator.messageForInvalidPlayerID(playerName)); + return; + } else if(!accountValidator.isValidPlayerPW(playerEnterCode)) { + // console.log("Error - enterCode : " + enterCode); + // onErrorPlayerPW(accountValidator.messageForInvalidPlayerPW(playerEnterCode)); + showErrorMessage(accountValidator.messageForInvalidPlayerPW(playerEnterCode), "error"); + + $(enterCode).focus(); + $(enterCode).select(); + + return; + } sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode); "./../server/player/edit_player.php", diff --git a/src/web/module/maestro_section_add_player.html b/src/web/module/maestro_section_add_player.html index f510dcb..33d133c 100644 --- a/src/web/module/maestro_section_add_player.html +++ b/src/web/module/maestro_section_add_player.html @@ -65,14 +65,14 @@ function addPlayer() { function onErrorPlayerName(message) { showErrorMessage(message, "error"); - $("#player_name").val(""); + $("#player_name").select(); $("#player_name").focus(); } function onErrorPlayerPW(message) { showErrorMessage(message, "error"); - $("#entercode").val(""); + $("#entercode").select(); $("#entercode").focus(); } @@ -98,7 +98,7 @@ function onErrorPlayerPW(message) {
- + 2~8자리의 숫자
@@ -158,7 +158,7 @@ function onErrorPlayerPW(message) {
- +
@@ -166,7 +166,7 @@ function onErrorPlayerPW(message) {
- +
@@ -174,7 +174,7 @@ function onErrorPlayerPW(message) {
- +
@@ -182,7 +182,7 @@ function onErrorPlayerPW(message) {
- +
@@ -190,7 +190,7 @@ function onErrorPlayerPW(message) {
- +
@@ -198,7 +198,7 @@ function onErrorPlayerPW(message) {
- +
@@ -206,7 +206,7 @@ function onErrorPlayerPW(message) {
- +
@@ -214,7 +214,7 @@ function onErrorPlayerPW(message) {
- +
@@ -222,7 +222,7 @@ function onErrorPlayerPW(message) {
- +
@@ -230,7 +230,7 @@ function onErrorPlayerPW(message) {
- +
diff --git a/src/web/module/maestro_section_search.html b/src/web/module/maestro_section_search.html index afe24cc..eaa62e2 100644 --- a/src/web/module/maestro_section_search.html +++ b/src/web/module/maestro_section_search.html @@ -75,7 +75,7 @@ function searchPlayer() {
- +
@@ -83,7 +83,7 @@ function searchPlayer() {
- +
@@ -91,7 +91,7 @@ function searchPlayer() {
- +
@@ -99,7 +99,7 @@ function searchPlayer() {
- +
@@ -107,7 +107,7 @@ function searchPlayer() {
- +
@@ -115,7 +115,7 @@ function searchPlayer() {
- +
@@ -123,7 +123,7 @@ function searchPlayer() {
- +
@@ -131,7 +131,7 @@ function searchPlayer() {
- +
@@ -139,7 +139,7 @@ function searchPlayer() {
- +
@@ -147,7 +147,7 @@ function searchPlayer() {
- +