Finalize API envelopes and close validation drift tasks
This commit is contained in:
@@ -89,7 +89,6 @@ function setupHandlers() {
|
||||
e.preventDefault();
|
||||
const username = $("login-username").value.trim();
|
||||
const password = $("login-password").value;
|
||||
if (username.length > 24) return toast("Username must be 24 characters or fewer.", true);
|
||||
if (!username || !password) return toast(t("auth.needCredentials"), true);
|
||||
if (!hasConsent() && !$("login-consent")?.checked) return toast(t("auth.cookieRequired"), true);
|
||||
try {
|
||||
@@ -117,8 +116,6 @@ function setupHandlers() {
|
||||
const displayName = $("register-displayName").value.trim();
|
||||
const adminKey = $("register-adminkey").value.trim();
|
||||
if (!displayName) return toast(t("toast.displayNameRequired") || "Display name is required.", true);
|
||||
if (username.length > 24) return toast("Username must be 24 characters or fewer.", true);
|
||||
if (displayName.length > 16) return toast("Display name must be 16 characters or fewer.", true);
|
||||
if (!username || !password) return toast(t("auth.needCredentials"), true);
|
||||
if (!hasConsent() && !$("register-consent")?.checked) return toast(t("auth.cookieRequired"), true);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user