mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-14 04:43:24 +00:00
Allow periods in usernames
Update username validation regex to allow periods (.) in addition to alphanumeric characters and dashes. Usernames must still start and end with alphanumeric characters.
This commit is contained in:
@@ -14,7 +14,7 @@ ed25519.hashes.sha512Async = async (message: Uint8Array) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Username validation
|
// Username validation
|
||||||
const USERNAME_REGEX = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
const USERNAME_REGEX = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/;
|
||||||
const USERNAME_MIN_LENGTH = 3;
|
const USERNAME_MIN_LENGTH = 3;
|
||||||
const USERNAME_MAX_LENGTH = 32;
|
const USERNAME_MAX_LENGTH = 32;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user