Commit 168e22ea by NGUYEN HOANG SON

check max length message content when send

parent 11089b39
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
"buttonTemplateSelection":"Template", "buttonTemplateSelection":"Template",
"buttonSend":"Send", "buttonSend":"Send",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required", "msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select", "operationSelection":"Operation select",
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
"buttonTemplateSelection":"テンプレート選択", "buttonTemplateSelection":"テンプレート選択",
"buttonSend":"送信", "buttonSend":"送信",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required", "msgSendTypeRequired":"Send type is required",
"operationSelection":"作業選択", "operationSelection":"作業選択",
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
"buttonTemplateSelection":"Template", "buttonTemplateSelection":"Template",
"buttonSend":"Send", "buttonSend":"Send",
"msgContentRequired":"Content is required", "msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"msgOperationRequired":"Operation is required", "msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required", "msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select", "operationSelection":"Operation select",
......
...@@ -41,6 +41,10 @@ SendMessage.checkValidation = function() { ...@@ -41,6 +41,10 @@ SendMessage.checkValidation = function() {
alert(I18N.i18nText('msgContentRequired')); alert(I18N.i18nText('msgContentRequired'));
return false; return false;
} }
if (!ValidationUtil.CheckMaxLengthForByte(message, 207)) {
alert(I18N.i18nText('msgContentInvalidLength'));
return false;
}
const operationId = SendMessage.getCurrentOperationId(); const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) { if (!ValidationUtil.IsNumber(operationId)) {
alert(I18N.i18nText('msgOperationRequired')); alert(I18N.i18nText('msgOperationRequired'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment