From ff0e05ac0855c57e56d14a7c1d9a7938842bbd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=98=89=E6=B3=BD?= <136064@qq.com> Date: Fri, 24 Nov 2023 21:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95=E9=AA=8C?= =?UTF-8?q?=E8=AF=81telephone=E3=80=81phone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/library/hggen/views/curd_generate_input.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/internal/library/hggen/views/curd_generate_input.go b/server/internal/library/hggen/views/curd_generate_input.go index d75b022..1d98abd 100644 --- a/server/internal/library/hggen/views/curd_generate_input.go +++ b/server/internal/library/hggen/views/curd_generate_input.go @@ -9,9 +9,10 @@ import ( "bytes" "context" "fmt" + "strings" + "hotgo/internal/dao" "hotgo/internal/model/input/sysin" - "strings" "github.com/gogf/gf/v2/database/gdb" "github.com/gogf/gf/v2/errors/gerror" @@ -175,9 +176,9 @@ func makeValidatorFunc(field *sysin.GenCodesColumnListModel) (err error, rule st } else if field.FormRole == FormRolePercentage { rule = fmt.Sprintf(EditInpValidatorGenerally, "min:0|max:100", field.GoName, field.Dc+"必须0-100之间") } else if field.FormRole == FormRoleTel { - rule = fmt.Sprintf(EditInpValidatorGenerally, "phone", field.GoName, field.Dc+"不是手机号码") - } else if field.FormRole == FormRolePhone { rule = fmt.Sprintf(EditInpValidatorGenerally, "telephone", field.GoName, field.Dc+"不是座机号码") + } else if field.FormRole == FormRolePhone { + rule = fmt.Sprintf(EditInpValidatorGenerally, "phone", field.GoName, field.Dc+"不是手机号码") } else if field.FormRole == FormRoleQq { rule = fmt.Sprintf(EditInpValidatorGenerally, "qq", field.GoName, field.Dc+"不是QQ号码") } else if field.FormRole == FormRoleEmail {