You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by hu...@apache.org on 2025/05/09 10:50:49 UTC
(servicecomb-service-center) branch dev updated: Update microservice_validator.go (#1505)
This is an automated email from the ASF dual-hosted git repository.
humingcheng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git
The following commit(s) were added to refs/heads/dev by this push:
new 2081f3c1 Update microservice_validator.go (#1505)
2081f3c1 is described below
commit 2081f3c1b7e6027c9fc62295463f14ef7b5d44e1
Author: Wanghb1 <10...@users.noreply.github.com>
AuthorDate: Fri May 9 18:50:43 2025 +0800
Update microservice_validator.go (#1505)
---
server/service/validator/microservice_validator.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/service/validator/microservice_validator.go b/server/service/validator/microservice_validator.go
index 8f885f51..a7120e5f 100644
--- a/server/service/validator/microservice_validator.go
+++ b/server/service/validator/microservice_validator.go
@@ -61,7 +61,7 @@ func MicroServiceKeyValidator() *validate.Validator {
return microServiceKeyValidator.Init(func(v *validate.Validator) {
v.AddRule("Environment", &validate.Rule{Min: 0, Max: 128, Regexp: envRegex})
v.AddRule("AppId", &validate.Rule{Min: 1, Max: 160, Regexp: nameRegex})
- v.AddRule("ServiceName", &validate.Rule{Max: 128, Regexp: nameRegex})
+ v.AddRule("ServiceName", &validate.Rule{Min: 1, Max: 128, Regexp: nameRegex})
v.AddRule("Version", &validate.Rule{Min: 1, Max: 64, Regexp: versionRegex})
})
}