Fix some translations and error messages
[vchess.git] / client / src / data / userCheck.js
index 0dccf1f..0d3a801 100644 (file)
@@ -1,11 +1,11 @@
 export function checkNameEmail(o) {
   if (typeof o.name === "string") {
-    if (o.name.length == 0) return "Empty name";
-    if (!o.name.match(/^[\w]+$/)) return "Name: alphanumerics and underscore";
+    if (o.name.length == 0) return "Missing name";
+    if (!o.name.match(/^[\w-]+$/)) return "Name: alphanumerics, hyphen and underscore";
   }
 
   if (typeof o.email === "string") {
-    if (o.email.length == 0) return "Empty email";
+    if (o.email.length == 0) return "Missing email";
     if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) return "Invalid email";
   }