tianxiaoliang commented on a change in pull request #124: Support parameter 
validation
URL: https://github.com/apache/servicecomb-kie/pull/124#discussion_r397669524
 
 

 ##########
 File path: pkg/validate/instance.go
 ##########
 @@ -0,0 +1,37 @@
+package validate
+
+import "github.com/go-mesh/openlogging"
+
+var defaultValidator *Validator
+
+// custom validate rules
+// tag names suggested to be "kie*", to distinguish from third party tags
+var customRules = []*RegexValidateRule{
+       NewRule("kieKey", 
`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$`, &Option{Min: 1, Max: 
256}),
+       NewRule("kieValueType", `^(string|ini|json|text|yaml|properties)$`, 
nil),
 
 Review comment:
   要保证,如果value type为空也是合法的,默认类型为text
   
   删掉string,没这个类型

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to