fix: 修正模板表单字段校验
This commit is contained in:
1 parent
17bd700c2b
commit
d5e63be074
2 files changed
+19
-1
No files matched your search
@@ -23,7 +23,8 @@ const inquiryFieldOptionSchema = z.object({
|
||||
|
||||
export const inquiryFieldSchema = z
|
||||
.object({
|
||||
key: z.string().regex(/^[a-z][a-z0-9_]*$/),
|
||||
// 字段 key 允许 snake_case 和 camelCase,模板字段通常使用 camelCase。
|
||||
key: z.string().regex(/^[a-z][a-zA-Z0-9_]*$/),
|
||||
type: inquiryFieldTypeSchema,
|
||||
label: z.string().min(1),
|
||||
required: z.boolean().optional(),
|
||||
|
||||
Reference in new issue
Block a user