mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-07 12:37:25 +01:00
[#961] updated min username length and added tests
This commit is contained in:
1 parent
01814067b1
commit
b1c7a012c5
2 files changed
+36
-1
No files matched your search
@@ -397,7 +397,7 @@ func (form *RecordUpsert) Validate() error {
|
||||
&form.Username,
|
||||
// require only on update, because on create we fallback to auto generated username
|
||||
validation.When(!form.record.IsNew(), validation.Required),
|
||||
validation.Length(4, 100),
|
||||
validation.Length(3, 100),
|
||||
validation.Match(usernameRegex),
|
||||
validation.By(form.checkUniqueUsername),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user