From 1b636a801928003b902cf945f7ced337b5532c57 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Wed, 20 Oct 2021 10:45:07 +0800 Subject: [PATCH] fix issue #473 --- templates/repo/cloudbrain/new.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/cloudbrain/new.tmpl b/templates/repo/cloudbrain/new.tmpl index 6191c58cb..012ae7844 100755 --- a/templates/repo/cloudbrain/new.tmpl +++ b/templates/repo/cloudbrain/new.tmpl @@ -250,11 +250,11 @@ let value_task = $("input[name='job_name']").val() let value_image = $("input[name='image']").val() let value_data = $("input[name='attachment']").val() - let re = /^[a-z0-9][a-z0-9-_]{1,35}$/ + let re = /^[a-z0-9][a-z0-9-_]{1,35}[^_]$/ let flag = re.test(value_task) if(!flag){ $('#messageInfo').css('display','block') - let str = '只能以小写字母或数字开头且只包含小写字母、数字、_和-、最长36个字符。' + let str = '只能以小写字母或数字开头且只包含小写字母、数字、_和-、最长36个字符,不能下划线(-)结尾。' $('#messageInfo p').text(str) return false }