Allow hyphen in username on server side + add icons for navigation
[vchess.git] / server / models / User.js
index 5117c17..3b88850 100644 (file)
@@ -20,7 +20,7 @@ const UserModel =
   checkNameEmail: function(o)
   {
     return (
-      (!o.name || o.name.match(/^[\w]+$/)) &&
+      (!o.name || o.name.match(/^[\w-]+$/)) &&
       (!o.email || o.email.match(/^[\w.+-]+@[\w.+-]+$/))
     );
   },