fix: Make model-level username regex less strict

Closes #1370
This commit is contained in:
Maksim Eltyshev
2025-10-14 23:47:31 +02:00
parent 39f970689a
commit 20d8f8ae53

View File

@@ -51,7 +51,7 @@
* type: string * type: string
* minLength: 3 * minLength: 3
* maxLength: 32 * maxLength: 32
* pattern: "^[a-zA-Z0-9]+((_{1}|\\.|){1}[a-zA-Z0-9])*$" * pattern: "^[a-z0-9._-]*$"
* nullable: true * nullable: true
* description: Unique username for user identification * description: Unique username for user identification
* example: john_doe * example: john_doe
@@ -298,7 +298,7 @@ module.exports = {
isNotEmptyString: true, isNotEmptyString: true,
minLength: 3, minLength: 3,
maxLength: 32, maxLength: 32,
regex: /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/, regex: /^[a-z0-9._-]*$/,
allowNull: true, allowNull: true,
}, },
avatar: { avatar: {