X-Git-Url: https://git.auder.net/images/pieces/%22%20%20V.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FuserCheck.js;h=0d3a801bd18e79d461d8e0ee22f25e1c58b1d207;hb=eac8fbb5f23107cf82ad28c64efa00d556c4691e;hp=0dccf1fbef5f5d9ed5912402c5f15a10d2013a34;hpb=866842c3c310524c034922870234120ed2a16cbf;p=vchess.git diff --git a/client/src/data/userCheck.js b/client/src/data/userCheck.js index 0dccf1fb..0d3a801b 100644 --- a/client/src/data/userCheck.js +++ b/client/src/data/userCheck.js @@ -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"; }