mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-01-31 15:37:09 +01:00
fix(account creation): Fix username length requirement
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@@ -212,7 +212,7 @@ const mailRegex = /^\S+@\S+\.\S+$/g;
|
||||
const validEmail = computed(() => mailRegex.test(email.value ?? ""));
|
||||
const validUsername = computed(
|
||||
() =>
|
||||
(username.value?.length ?? 0) > 5 &&
|
||||
(username.value?.length ?? 0) >= 5 &&
|
||||
username.value?.toLowerCase() == username.value
|
||||
);
|
||||
const validPassword = computed(() => (password.value?.length ?? 0) >= 14);
|
||||
|
||||
@@ -41,7 +41,7 @@ export default defineEventHandler(async (h3) => {
|
||||
|
||||
const username = useInvitationOrBodyRequirement(
|
||||
"username",
|
||||
(e) => e.length > 5
|
||||
(e) => e.length >= 5
|
||||
);
|
||||
const email = useInvitationOrBodyRequirement("email", (e) =>
|
||||
mailRegex.test(e)
|
||||
|
||||
Reference in New Issue
Block a user