fix(clients): reject spaces, '/', '\' and control chars in client email

Client emails containing a slash broke the path-param routes
(edit/delete/view returned 404 / "client not found"), leaving stale
records that could only be cleared with manual SQLite edits. Validate
the email on both the backend (Create + Update, which also covers the
bulk paths) and the frontend (Zod) so these characters are rejected at
save time with a clear, localized message across all 13 locales.

Closes #4695
This commit is contained in:
MHSanaei
2026-05-30 22:40:48 +02:00
parent d1882c7f29
commit a0865a67fd
16 changed files with 74 additions and 1 deletions
+1
View File
@@ -646,6 +646,7 @@
"subId": "订阅 ID",
"online": "在线",
"email": "邮箱",
"emailInvalidChars": "邮箱不能包含空格、'/'、'\\' 或控制字符",
"group": "分组",
"groupDesc": "用于对相关客户端进行分桶的逻辑标签(如团队、客户、地区)。可从工具栏筛选。",
"groupPlaceholder": "如 customer-a",