优化验证规则表达式生成
This commit is contained in:
@ -7,7 +7,10 @@
|
||||
// Date : 2025-01-23 18:44
|
||||
package abstract
|
||||
|
||||
import "git.zhangdeman.cn/zhangdeman/consts"
|
||||
import (
|
||||
"git.zhangdeman.cn/gateway/validator/v10/define"
|
||||
"git.zhangdeman.cn/zhangdeman/consts"
|
||||
)
|
||||
|
||||
// IValidateRuleGenerateFunc 生成校验规则的方法约束
|
||||
//
|
||||
@ -23,4 +26,11 @@ import "git.zhangdeman.cn/zhangdeman/consts"
|
||||
// 返回值说明
|
||||
// - express: 生成的表达式
|
||||
// - err: 表达式生成过程中出现的异常
|
||||
type IValidateRuleGenerateFunc func(validateRule consts.ValidatorRule, paramList ...any) (express string, err error)
|
||||
type IValidateRuleGenerateFunc func(ruleConfig define.GenerateRuleExpressConfig) (express string, err error)
|
||||
|
||||
// IFieldValidateRuleGenerateFunc 字段验证规则生成方法
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:16 2025/1/24
|
||||
type IFieldValidateRuleGenerateFunc func(validateRule consts.ValidatorRule, paramList ...any) (express string, err error)
|
||||
|
Reference in New Issue
Block a user