From 25cec5ec99227efded4fe276db626a1be11a5d77 Mon Sep 17 00:00:00 2001 From: mibumaho Date: Thu, 26 Feb 2026 15:08:04 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=82=B9=E3=83=9A=E3=83=AB=E3=83=9F?= =?UTF-8?q?=E3=82=B9issue=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/scripts/gem/functions.js | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js index f0931aa88d..259777cb61 100644 --- a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js +++ b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js @@ -1578,10 +1578,34 @@ $.fn.allInputCheck = function(){ $v.tokenValue = _t; - if (errors == null || erros.length == 0) { + if (errors == null || errors.length == 0) { $v.getMassReference(); } else { - alert(errors); + // テキストの改行を除去するヘルパー関数 + const normalizeText = (text) => { + return String(text).replace(/\n/g, ' '); + }; + + // エラーメッセージを文字列に変換して表示 + // errorsは配列形式(ListまたはList) + const errorMessage = errors.map((error) => { + if (typeof error === 'string') { + // 文字列の場合(ApplicationException) + return normalizeText(error); + } else if (error && error.errorMessages) { + // ValidateErrorオブジェクトの場合 + // 各メッセージから改行を除去してからカンマで結合 + var messages = error.errorMessages.map(normalizeText).join(', '); + if (error.propertyDisplayName) { + return error.propertyDisplayName + ':' + messages; + } + return messages; + } else { + // その他の場合 + return normalizeText(error); + } + }).join('\n\n'); + alert(errorMessage); } }); }); From 7112c0f9334841dce499883ba0209ebf50f97d21 Mon Sep 17 00:00:00 2001 From: MIBUMAHO Date: Fri, 27 Feb 2026 12:58:43 +0900 Subject: [PATCH 2/4] Update iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../main/resources/META-INF/resources/scripts/gem/functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js index 259777cb61..d4084efe53 100644 --- a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js +++ b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js @@ -1583,7 +1583,8 @@ $.fn.allInputCheck = function(){ } else { // テキストの改行を除去するヘルパー関数 const normalizeText = (text) => { - return String(text).replace(/\n/g, ' '); + // CRLF(\r\n)、LF(\n)、CR(\r) など連続する改行コードをまとめて空白に正規化する + return String(text).replace(/[\r\n]+/g, ' '); }; // エラーメッセージを文字列に変換して表示 From 653f92382634a59a404dfbe83f801a2fc27cff0b Mon Sep 17 00:00:00 2001 From: mibumaho Date: Fri, 27 Feb 2026 15:50:31 +0900 Subject: [PATCH 3/4] no message --- .../main/resources/META-INF/resources/scripts/gem/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js index d4084efe53..4241321b90 100644 --- a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js +++ b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js @@ -1596,7 +1596,7 @@ $.fn.allInputCheck = function(){ } else if (error && error.errorMessages) { // ValidateErrorオブジェクトの場合 // 各メッセージから改行を除去してからカンマで結合 - var messages = error.errorMessages.map(normalizeText).join(', '); + const messages = error.errorMessages.map(normalizeText).join(', '); if (error.propertyDisplayName) { return error.propertyDisplayName + ':' + messages; } From 5fbc1b38d8a54b055ecc08594c836672acaaa2f2 Mon Sep 17 00:00:00 2001 From: mibumaho Date: Wed, 4 Mar 2026 15:19:35 +0900 Subject: [PATCH 4/4] no message --- .../main/resources/META-INF/resources/scripts/gem/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js index 4241321b90..d24d096445 100644 --- a/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js +++ b/iplass-gem/src/main/resources/META-INF/resources/scripts/gem/functions.js @@ -1598,7 +1598,7 @@ $.fn.allInputCheck = function(){ // 各メッセージから改行を除去してからカンマで結合 const messages = error.errorMessages.map(normalizeText).join(', '); if (error.propertyDisplayName) { - return error.propertyDisplayName + ':' + messages; + return error.propertyDisplayName + ': ' + messages; } return messages; } else {