Skip to content

Commit

Permalink
update account name validate rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanghb1 authored Jan 10, 2025
1 parent ba5d485 commit 8791fdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/service/validator/microservice_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ var (

var (
// 非map/slice的validator
nameRegex, _ = regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$`)
nameRegex, _ = regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$`)
accountNameRegex, _ = regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9@_\-.]*[a-zA-Z0-9]$`)
// find 支持alias,多个:
serviceNameForFindRegex, _ = regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.:]*[a-zA-Z0-9]$`)
// version規則: x[.y[.z]]
Expand Down

0 comments on commit 8791fdd

Please sign in to comment.