refactor: use includes

This commit is contained in:
Barış Soner Uşaklı
2026-03-03 10:44:27 -05:00
parent 44434b0d3f
commit 0c43e2dafb

View File

@@ -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) {