增加验证规则表达式生成方法的约束
This commit is contained in:
		
							
								
								
									
										4
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.mod
									
									
									
									
									
								
							@ -27,3 +27,7 @@ require (
 | 
			
		||||
	github.com/tidwall/pretty v1.2.1 // indirect
 | 
			
		||||
	gopkg.in/yaml.v3 v3.0.1 // indirect
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
replace (
 | 
			
		||||
	git.zhangdeman.cn/zhangdeman/consts => ../consts
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										26
									
								
								v10/abstract/validate_rule.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								v10/abstract/validate_rule.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
// Package abstract ...
 | 
			
		||||
//
 | 
			
		||||
// Description : abstract ...
 | 
			
		||||
//
 | 
			
		||||
// Author : go_developer@163.com<白茶清欢>
 | 
			
		||||
//
 | 
			
		||||
// Date : 2025-01-23 18:44
 | 
			
		||||
package abstract
 | 
			
		||||
 | 
			
		||||
import "git.zhangdeman.cn/zhangdeman/consts"
 | 
			
		||||
 | 
			
		||||
// IValidateRuleGenerateFunc 生成校验规则的方法约束
 | 
			
		||||
//
 | 
			
		||||
// Author : go_developer@163.com<白茶清欢>
 | 
			
		||||
//
 | 
			
		||||
// Date : 18:46 2025/1/23
 | 
			
		||||
//
 | 
			
		||||
//	参数说明
 | 
			
		||||
//
 | 
			
		||||
// 		- validateRule: 参数验证规则, 具体参见静态库声明
 | 
			
		||||
//		- paramList: 验证规则需要的参数列表, 可以为空
 | 
			
		||||
//
 | 
			
		||||
//	返回值说明
 | 
			
		||||
//		- express: 生成的表达式
 | 
			
		||||
//		- err: 表达式生成过程中出现的异常
 | 
			
		||||
type IValidateRuleGenerateFunc func(validateRule consts.ValidatorRule, paramList ...any) (express string, err error)
 | 
			
		||||
		Reference in New Issue
	
	Block a user