增加默认表达式生成方法,同时支持自定义表达式生成方法,覆盖默认行为

This commit is contained in:
2025-01-24 11:15:59 +08:00
parent 978e52089c
commit 064f5e2c5b
3 changed files with 64 additions and 4 deletions

View File

@ -15,12 +15,12 @@ import "git.zhangdeman.cn/zhangdeman/consts"
//
// Date : 18:46 2025/1/23
//
// 参数说明
// 参数说明
//
// - validateRule: 参数验证规则, 具体参见静态库声明
// - paramList: 验证规则需要的参数列表, 可以为空
// - validateRule: 参数验证规则, 具体参见静态库声明
// - paramList: 验证规则需要的参数列表, 可以为空
//
// 返回值说明
// 返回值说明
// - express: 生成的表达式
// - err: 表达式生成过程中出现的异常
type IValidateRuleGenerateFunc func(validateRule consts.ValidatorRule, paramList ...any) (express string, err error)