This is an automated email from the ASF dual-hosted git repository.
tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git
The following commit(s) were added to refs/heads/master by this push:
new da18ef3 支持value中的中文字符 (#170)
da18ef3 is described below
commit da18ef3fbe4276a22b93d076a8646b7f1dbbff8a
Author: GuoYL <[email protected]>
AuthorDate: Fri Jan 8 10:27:42 2021 +0800
支持value中的中文字符 (#170)
---
pkg/validate/instance.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkg/validate/instance.go b/pkg/validate/instance.go
index a85b6f3..1cebe73 100644
--- a/pkg/validate/instance.go
+++ b/pkg/validate/instance.go
@@ -7,6 +7,7 @@ const (
commonNameRegexString =
`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$`
getKeyRegexString =
`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$|^beginWith\([a-zA-Z0-9][a-zA-Z0-9_\-.]*\)$`
asciiRegexString = `^[\x00-\x7F]*$`
+ allCharString = `.*`
)
// custom validate rules
@@ -17,7 +18,7 @@ var customRules = []*RegexValidateRule{
NewRule("commonName", commonNameRegexString, &Option{Min: 1, Max: 256}),
NewRule("valueType", `^$|^(ini|json|text|yaml|properties)$`, nil),
NewRule("kvStatus", `^$|^(enabled|disabled)$`, nil),
- NewRule("value", asciiRegexString, &Option{Max: 2097152}), //ASCII, 2M
+ NewRule("value", allCharString, &Option{Max: 2097152}), //ASCII, 2M
NewRule("labelKV", commonNameRegexString, &Option{Max: 32}),
NewRule("check", asciiRegexString, &Option{Max: 1048576}), //ASCII, 1M
}