Continue debug attempt for move update on server
[vchess.git] / server / models / User.js
index 3b88850..2984af4 100644 (file)
@@ -20,8 +20,8 @@ const UserModel =
   checkNameEmail: function(o)
   {
     return (
-      (!o.name || o.name.match(/^[\w-]+$/)) &&
-      (!o.email || o.email.match(/^[\w.+-]+@[\w.+-]+$/))
+      (!o.name || !!(o.name.match(/^[\w-]+$/))) &&
+      (!o.email || !!(o.email.match(/^[\w.+-]+@[\w.+-]+$/)))
     );
   },