workspaces to dashboards, imap email sync, ffmpeg tool, tts fix, file browser refresh, automation sidebar reorder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 20:00:45 +00:00
co-authored by Claude Opus 4.6
parent bd362dc586
commit 927267e041
98 changed files with 1176 additions and 802 deletions
+23
View File
@@ -0,0 +1,23 @@
import * as errors from '@@/custom-errors';
export function validateUsername(username: string | undefined): string {
if (!username || !username.trim()) {
throw errors.BAD_REQUEST('Username is required');
}
const trimmed = username.trim();
if (trimmed.includes('@')) {
throw errors.BAD_REQUEST('Username cannot be an email address');
}
if (trimmed.length < 2 || trimmed.length > 32) {
throw errors.BAD_REQUEST('Username must be between 2 and 32 characters');
}
if (!/^[a-zA-Z0-9._-]+$/.test(trimmed)) {
throw errors.BAD_REQUEST('Username can only contain letters, numbers, dots, hyphens, and underscores');
}
return trimmed;
}