X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FuserCheck.js;h=0dccf1fbef5f5d9ed5912402c5f15a10d2013a34;hb=866842c3c310524c034922870234120ed2a16cbf;hp=745d6d6ec788de4db1d2617de2b1958deaa0cf67;hpb=8477e53d8e78606e4c4e4bf91c77b1011aab583c;p=vchess.git diff --git a/client/src/data/userCheck.js b/client/src/data/userCheck.js index 745d6d6e..0dccf1fb 100644 --- a/client/src/data/userCheck.js +++ b/client/src/data/userCheck.js @@ -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 "";