refactor: 优化错误处理逻辑

This commit is contained in:
siujamo
2025-12-29 11:49:44 +08:00
parent b0ccd8f832
commit 1ae17823ef
4 changed files with 51 additions and 27 deletions
+5
View File
@@ -0,0 +1,5 @@
import type { AntFormValidationError } from "@/types/antd"
export function getFieldErrorMessage(error: AntFormValidationError<unknown>): string {
return error.errorFields.map((errorField) => errorField.errors.join("")).join("")
}
+1
View File
@@ -1,2 +1,3 @@
export * as PhoneNumberUtils from "./phone-number-utils"
export * as DepartmentUtils from "./department-utils"
export * as AntUtils from "./ant-utils"