chore: 还原naive初始化

This commit is contained in:
xingyu4j
2025-10-16 10:16:45 +08:00
parent b28a35cd79
commit bc6d0f7dd6
244 changed files with 669 additions and 26673 deletions

View File

@@ -7,7 +7,6 @@ import type { ComponentType } from './component';
import { setupVbenForm, useVbenForm as useForm, z } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { isMobile } from '@vben/utils';
async function initSetupVbenForm() {
setupVbenForm<ComponentType>({
@@ -34,25 +33,6 @@ async function initSetupVbenForm() {
}
return true;
},
// 手机号非必填
mobile: (value, _params, ctx) => {
if (value === undefined || value === null || value.length === 0) {
return true;
} else if (!isMobile(value)) {
return $t('ui.formRules.mobile', [ctx.label]);
}
return true;
},
// 手机号必填
mobileRequired: (value, _params, ctx) => {
if (value === undefined || value === null || value.length === 0) {
return $t('ui.formRules.required', [ctx.label]);
}
if (!isMobile(value)) {
return $t('ui.formRules.mobile', [ctx.label]);
}
return true;
},
},
});
}