[#3697] allowed hyphens in usernames
This commit is contained in:
parent
5835193900
commit
890a0904cf
|
@ -25,7 +25,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// username value regex pattern
|
// username value regex pattern
|
||||||
var usernameRegex = regexp.MustCompile(`^[\w][\w\.]*$`)
|
var usernameRegex = regexp.MustCompile(`^[\w][\w\.\-]*$`)
|
||||||
|
|
||||||
// RecordUpsert is a [models.Record] upsert (create/update) form.
|
// RecordUpsert is a [models.Record] upsert (create/update) form.
|
||||||
type RecordUpsert struct {
|
type RecordUpsert struct {
|
||||||
|
|
|
@ -753,7 +753,7 @@ func TestRecordUpsertAuthRecord(t *testing.T) {
|
||||||
"create with all allowed auth fields",
|
"create with all allowed auth fields",
|
||||||
"",
|
"",
|
||||||
map[string]any{
|
map[string]any{
|
||||||
"username": "test_new",
|
"username": "test_new-a.b",
|
||||||
"email": "test_new@example.com",
|
"email": "test_new@example.com",
|
||||||
"emailVisibility": true,
|
"emailVisibility": true,
|
||||||
"password": "12345678",
|
"password": "12345678",
|
||||||
|
|
Loading…
Reference in New Issue