diff --git a/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java b/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java index 0b83889462..328cf0c89d 100644 --- a/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java +++ b/system-setting/backend/src/main/java/io/metersphere/excel/listener/UserDataListener.java @@ -88,8 +88,8 @@ public class UserDataListener extends EasyExcelListener { stringBuilder.append(Translator.get("user_import_id_too_long") + ";"); } - if (data.getName().length() > 64) { - stringBuilder.append(Translator.get("user_import_name_too_long") + ";"); + if (data.getName().length() > 50 || data.getName().length() < 2) { + stringBuilder.append(Translator.get("user_import_name_length_limit") + ";"); } if (containsChineseCharacter(data.getId())) { diff --git a/system-setting/backend/src/main/resources/i18n/messages_en_US.properties b/system-setting/backend/src/main/resources/i18n/messages_en_US.properties index feb2ddd4bd..edad9b1bf5 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_en_US.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_en_US.properties @@ -7,4 +7,4 @@ plugin_parse_error=Plugin parse error plugin_type_error=Plugin type selection error! user_import_id_not_chinese=User id cannot be Chinese user_import_id_too_long=User ID length cannot exceed 50 characters -user_import_name_too_long=Username length cannot exceed 64 characters \ No newline at end of file +user_import_name_length_limit=The name must be between 2-50 characters in length \ No newline at end of file diff --git a/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties b/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties index a9a5407515..1156ac56be 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -7,4 +7,4 @@ plugin_parse_error=插件解析失败 plugin_type_error=插件类型选择错误! user_import_id_not_chinese=用户ID不能为中文 user_import_id_too_long=用户ID长度不能超过50个字符 -user_import_name_too_long=用户名称长度不能超过64个字符 +user_import_name_length_limit=姓名长度必须在2-50个字符之间 diff --git a/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties b/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties index 0c586fcc06..37baaaa962 100644 --- a/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/system-setting/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -7,4 +7,4 @@ plugin_parse_error=插件解析失敗! plugin_type_error=插件類型選擇錯誤! user_import_id_not_chinese=用戶id不能為中文 user_import_id_too_long=用戶ID長度不能超過50個字符 -user_import_name_too_long=用戶名稱長度不能超過64個字符 \ No newline at end of file +user_import_name_length_limit=姓名長度必須在2-50個字符之間 \ No newline at end of file