Skip to content

Commit 6a4b210

Browse files
committed
fix(web): fix function name regx error
1 parent ce225d3 commit 6a4b210

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

server/src/function/dto/create-function.dto.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class CreateFunctionDto {
1515
description: 'Function name is unique in the application',
1616
})
1717
@IsNotEmpty()
18-
@Matches(/^[a-zA-Z0-9_.-\/]{1,256}$/)
18+
@Matches(/^[a-zA-Z0-9_.\-\/]{1,256}$/)
1919
name: string
2020

2121
@ApiPropertyOptional()

web/src/pages/app/functions/mods/FunctionPanel/CreateModal/PromptModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const PromptModal = (props: {
151151
<Input
152152
{...register("name", {
153153
pattern: {
154-
value: /^[a-zA-Z0-9_.-\/]{1,256}$/,
154+
value: /^[a-zA-Z0-9_.\-\/]{1,256}$/,
155155
message: t("FunctionPanel.FunctionNameRule"),
156156
},
157157
})}

web/src/pages/app/functions/mods/FunctionPanel/CreateModal/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const CreateModal = (props: {
122122
<Input
123123
{...register("name", {
124124
pattern: {
125-
value: /^[a-zA-Z0-9_.-\/]{1,256}$/,
125+
value: /^[a-zA-Z0-9_.\-\/]{1,256}$/,
126126
message: t("FunctionPanel.FunctionNameRule"),
127127
},
128128
})}

0 commit comments

Comments
 (0)