add email address length limit

This commit is contained in:
oiov
2025-04-06 10:46:15 +08:00
parent 125d6ed887
commit a3e87f35e3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -97,8 +97,8 @@ export default function EmailSidebar({
const totalPages = data ? Math.ceil(data.total / pageSize) : 0;
const handleSubmitEmail = async (emailSuffix: string) => {
if (!emailSuffix) {
toast.error("Email address cannot be empty");
if (!emailSuffix || emailSuffix.length < 5) {
toast.error("Email address characters must be at least 5");
return;
}
if (/[^a-zA-Z0-9_\-\.]/.test(emailSuffix)) {
+1 -1
View File
File diff suppressed because one or more lines are too long