Some more cleaning + fixes
[vchess.git] / client / src / data / userCheck.js
index dac8ef6..745d6d6 100644 (file)
@@ -3,9 +3,11 @@ export function checkNameEmail(o) {
     if (o.name.length == 0) return "Empty name";
     if (!o.name.match(/^[\w]+$/)) return "Bad characters in name";
   }
+
   if (typeof o.email === "string") {
     if (o.email.length == 0) return "Empty email";
     if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) return "Bad characters in email";
   }
+
   return "";
 }