1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2024-11-28 10:03:42 +02:00

[#3697] allowed hyphens in usernames

This commit is contained in:
Gani Georgiev 2023-11-11 12:19:16 +02:00
parent 5835193900
commit 890a0904cf
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ import (
)
// 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.
type RecordUpsert struct {

View File

@ -753,7 +753,7 @@ func TestRecordUpsertAuthRecord(t *testing.T) {
"create with all allowed auth fields",
"",
map[string]any{
"username": "test_new",
"username": "test_new-a.b",
"email": "test_new@example.com",
"emailVisibility": true,
"password": "12345678",