diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index a185d93618..da3598bf48 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -37,10 +37,10 @@ - + - + @@ -87,8 +87,17 @@ rules: { name: [ {required: true, message: this.$t('project.input_name'), trigger: 'blur'}, - {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} - ] + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, + { + required: true, + pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/, + message: this.$t('project.special_characters_are_not_supported'), + trigger: 'blur' + } + ], + description: [ + {max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'} + ], }, } }, diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index 0150c7e10c..c64a579a1e 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -218,7 +218,7 @@ rule: { name: [ {required: true, message: this.$t('organization.input_name'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/, diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 87a6983ac2..dfb8091e9f 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -447,7 +447,7 @@ rules: { name: [ {required: true, message: this.$t('workspace.input_name'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, + {min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}, { required: true, pattern: /^(?!-)(?!.*?-$)[a-zA-Z0-9\u4e00-\u9fa5-]+$/, diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 4aa8310390..b6da7a8c52 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -114,7 +114,7 @@ export default { 'input_name': 'Please enter a organization name', 'select_organization': 'Please select organization', 'search_by_name': 'Search by name', - 'special_characters_are_not_supported': 'Special characters are not supported', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', 'none': 'None Organization', 'select': 'Select Organization', }, @@ -129,6 +129,7 @@ export default { 'input_name': 'Please enter a workspace name', 'owning_workspace': 'Owning Workspace', 'please_choose_workspace': 'Please select Workspace', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', }, member: { 'create': 'Create', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index c0bd508f19..d88a306271 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -113,7 +113,7 @@ export default { 'input_name': '请输入组织名称', 'select_organization': '请选择组织', 'search_by_name': '根据名称搜索', - 'special_characters_are_not_supported': '不支持特殊字符', + 'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', 'none': '无组织', 'select': '选择组织', }, @@ -127,6 +127,7 @@ export default { 'input_name': '请输入项目名称', 'owning_workspace': '所属工作空间', 'please_choose_workspace': '请选择工作空间', + 'special_characters_are_not_supported': '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', }, member: { 'create': '添加成员', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 44f50b2114..be2a853c98 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -113,7 +113,7 @@ export default { 'input_name': '請輸入組織名稱', 'select_organization': '請選擇組織', 'search_by_name': '根據名稱搜索', - 'special_characters_are_not_supported': '不支持特殊字符', + 'special_characters_are_not_supported': 'Incorrect format (special characters are not supported and cannot end with \'-\')', 'none': '無組織', 'select': '選擇組織', }, @@ -127,6 +127,7 @@ export default { 'input_name': '請輸入項目名稱', 'owning_workspace': '所屬工作空間', 'please_choose_workspace': '請選擇工作空間', + 'special_characters_are_not_supported': '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)', }, member: { 'create': '添加成員',