Skip to content
Snippets Groups Projects
Commit 95f078ee authored by Cornel Rautenbach's avatar Cornel Rautenbach
Browse files

String util for valid username check

parent e48a97aa
Branches
Tags
No related merge requests found
...@@ -83,7 +83,7 @@ func IsAlphaNumericOrDash(str string) bool { ...@@ -83,7 +83,7 @@ func IsAlphaNumericOrDash(str string) bool {
} }
func IsValidUsername(str string) bool { func IsValidUsername(str string) bool {
regex := regexp.MustCompile("^[a-zA-Z0-9-.@]*$") regex := regexp.MustCompile("^[a-zA-Z0-9-.@+]*$")
return regex.MatchString(str) return regex.MatchString(str)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment