Revise server code + a few fixes in trnalsations and ComputerGame
[vchess.git] / client / src / data / userCheck.js
index 745d6d6..0dccf1f 100644 (file)
@@ -1,12 +1,12 @@
 export function checkNameEmail(o) {
   if (typeof o.name === "string") {
     if (o.name.length == 0) return "Empty name";
-    if (!o.name.match(/^[\w]+$/)) return "Bad characters in name";
+    if (!o.name.match(/^[\w]+$/)) return "Name: alphanumerics and underscore";
   }
 
   if (typeof o.email === "string") {
     if (o.email.length == 0) return "Empty email";
-    if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) return "Bad characters in email";
+    if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) return "Invalid email";
   }
 
   return "";