优化字段表达式构建, 增加单元测试

This commit is contained in:
zhangdeman committed 2025-01-24 16:40:29 +08:00
1 parent 44e6c5cdcf
commit 5fe0557d90
4 files changed
+62 -9

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ var (
ErrValidatorRuleParamCntIsNotEven = errors.New("validate rule param count is not even")
ErrValidatorRuleGroupOrSimpleRuleAllEmpty = errors.New("validator rule group or simple rule all empty")
ErrValidatorRuleFieldIsEmpty = errors.New("field is empty")
)
// IsErr 是否指定类型Err
+2 -2
View File
@@ -26,6 +26,6 @@ type FieldValidateGenerateConfig struct {
//
// Date : 11:27 2025/1/24
type GenerateRuleExpressConfig struct {
Rule *consts.ValidatorRule `json:"rule,omitempty"` // 条件配置
ParamList []any `json:"param_list,omitempty"` // 规则验证的参数列表
Rule consts.ValidatorRule `json:"rule,omitempty"` // 条件配置
ParamList []any `json:"param_list,omitempty"` // 规则验证的参数列表
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.