feat: 非必填邮箱

pull/104/MERGE
xingyu4j 2025-05-12 15:16:21 +08:00
parent 0eb8a683c9
commit 8f7343c31e
5 changed files with 5 additions and 5 deletions

View File

@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'email',
label: '邮箱',
component: 'Input',
rules: z.string().email('邮箱格式不正确').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'mobile',

View File

@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
placeholder: '请输入邮箱',
},
rules: z.string().email('请输入正确的邮箱地址').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'status',

View File

@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'email',
label: '邮箱',
component: 'Input',
rules: z.string().email('邮箱格式不正确').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'mobile',

View File

@ -95,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
placeholder: '请输入邮箱',
},
rules: z.string().email('请输入正确的邮箱地址').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'status',

View File

@ -83,7 +83,7 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'email',
label: '邮箱',
component: 'Input',
rules: z.string().email('邮箱格式不正确').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'mobile',