minor fix

This commit is contained in:
daniel31x13
2024-09-18 11:39:31 -04:00
parent eb00d151b7
commit e071b9eb07
+9 -7
View File
@@ -38,13 +38,15 @@ export const PostUserSchema = () => {
email: emailEnabled
? z.string().trim().email().toLowerCase()
: z.string().optional(),
username: z
.string()
.trim()
.toLowerCase()
.min(3)
.max(50)
.regex(/^[a-z0-9_-]{3,50}$/),
username: emailEnabled
? z.string().optional()
: z
.string()
.trim()
.toLowerCase()
.min(3)
.max(50)
.regex(/^[a-z0-9_-]{3,50}$/),
});
};