Skip to content

Improve valid user name check #20136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Nov 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add more cases
  • Loading branch information
wolfogre committed Nov 4, 2022
commit 1f53ec0d81e9d54c355a004a5fb65c4eabc2438c
4 changes: 4 additions & 0 deletions modules/validation/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func TestIsValidUsername(t *testing.T) {
{arg: "a_-bc", want: false},
{arg: "a/bc", want: false},
{arg: "☁️", want: false},
{arg: "-", want: false},
{arg: "--diff", want: false},
{arg: "-im-here", want: false},
{arg: "a space", want: false},
}
for _, tt := range tests {
t.Run(tt.arg, func(t *testing.T) {
Expand Down