diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 013d3e143..dd998c244 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -158,7 +158,8 @@ const message = { paramUrlAndPort: 'The format is http(s)://(domain name/ip):(port)', nginxDoc: 'Only supports English case, numbers, and .', appName: 'Support English, numbers, - and _, length 2-30, and cannot start and end with -_', - conatinerName: 'Supports letters, numbers, underscores, hyphens and dots, cannot end with hyphen- or dot.', + conatinerName: + 'Supports letters, numbers, underscores, hyphens and dots, cannot end with hyphen- or dot.1-127', disableFunction: 'Only support letters and,', leechExts: 'Only support letters, numbers and,', }, diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index a31952009..be5ea796d 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -161,7 +161,7 @@ const message = { paramUrlAndPort: '格式为 http(s)://(域名/ip):(端口)', nginxDoc: '仅支持英文大小写,数字,和.', appName: '支持英文、数字、-和_,长度2-30,并且不能以-_开头和结尾', - conatinerName: '支持字母、数字、下划线、连字符和点,不能以连字符-或点.结尾', + conatinerName: '支持字母、数字、下划线、连字符和点,不能以连字符-或点.结尾,长度1-127', disableFunction: '仅支持字母和,', leechExts: '件支持字母数字和,', }, diff --git a/frontend/src/views/app-store/detail/install/index.vue b/frontend/src/views/app-store/detail/install/index.vue index 8b5c3af6f..3d2ca0e9f 100644 --- a/frontend/src/views/app-store/detail/install/index.vue +++ b/frontend/src/views/app-store/detail/install/index.vue @@ -136,8 +136,8 @@ const rules = ref({ name: [Rules.appName], params: [], containerName: [Rules.containerName], - cpuQuota: [checkNumberRange(0, 99999)], - memoryLimit: [checkNumberRange(0, 9999999999)], + cpuQuota: [Rules.requiredInput, checkNumberRange(0, 99999)], + memoryLimit: [Rules.requiredInput, checkNumberRange(0, 9999999999)], }); const loading = ref(false); const paramForm = ref(); @@ -188,6 +188,12 @@ const submit = async (formEl: FormInstance | undefined) => { return; } req.appDetailId = installData.value.appDetailId; + if (req.cpuQuota < 0) { + req.cpuQuota = 0; + } + if (req.memoryLimit < 0) { + req.memoryLimit = 0; + } loading.value = true; InstallApp(req) .then(() => {