diff --git a/models/user.go b/models/user.go index c46c88d..e1929e0 100644 --- a/models/user.go +++ b/models/user.go @@ -185,7 +185,7 @@ func (r *UserDataUpdate) IsValid() bool { } func ValidateUsername(username string) bool { - return len(username) >= 1 && username != "current" + return len(username) >= 1 && username != "current" && !strings.Contains(username, " ") } func ValidatePassword(password string) bool {