1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-04-15 05:21:56 +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 // 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 {

View File

@ -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",