improved workflow name rules

pull/852/head
Jingyi 2024-07-16 08:18:15 +08:00
parent 9b4f8db06a
commit 9f1c628d5b
2 changed files with 2 additions and 2 deletions

View File

@ -1174,7 +1174,7 @@ if is_on_ec2:
return web.Response(status=200, content_type='application/json',
body=json.dumps({"result": False, "message": f"{workflow_name} is not allowed"}))
if not re.match(r'^[A-Za-z][A-Za-z0-9_]*$', workflow_name):
if not re.match(r'^[A-Za-z][A-Za-z0-9]*$', workflow_name):
return web.Response(status=200, content_type='application/json',
body=json.dumps({"result": False, "message": f"{workflow_name} is invalid name"}))

View File

@ -591,7 +591,7 @@ export const SCHEMA_WORKFLOW_NAME: JsonSchema = {
type: JsonSchemaType.STRING,
minLength: 1,
maxLength: 20,
pattern: '^[A-Za-z][A-Za-z0-9_]*$',
pattern: '^[A-Za-z][A-Za-z0-9]*$',
description: 'Name of workflow',
};