优化字段表达式构建, 增加单元测试
This commit is contained in:
@ -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
|
||||
|
@ -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