From 0c43e2dafb6774fb14e9a36e67a3e1b1d307d2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 3 Mar 2026 10:44:27 -0500 Subject: [PATCH] refactor: use includes --- public/src/utils.common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/utils.common.js b/public/src/utils.common.js index 7dd3a3c0e0..dfb6f35c98 100644 --- a/public/src/utils.common.js +++ b/public/src/utils.common.js @@ -332,7 +332,7 @@ const utils = { }, isEmailValid: function (email) { - return typeof email === 'string' && email.length && email.indexOf('@') !== -1 && email.indexOf(',') === -1 && email.indexOf(';') === -1; + return typeof email === 'string' && email.length && email.includes('@') && !email.includes(',') && !email.includes(';'); }, isUserNameValid: function (name) {