X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=server%2Fdata%2FuserCheck.js;fp=server%2Fdata%2FuserCheck.js;h=0000000000000000000000000000000000000000;hb=98db2082fd31e7a7bc0348e31ce119f39dbc31b3;hp=9c46b2ab61c88c969c83f38d11efbdcdf7871745;hpb=98f3902b0f3c4370b07d534f5fcbca146a7a651d;p=vchess.git diff --git a/server/data/userCheck.js b/server/data/userCheck.js deleted file mode 100644 index 9c46b2ab..00000000 --- a/server/data/userCheck.js +++ /dev/null @@ -1,19 +0,0 @@ -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 (typeof o.email === "string") - { - if (o.email.length == 0) - return "Empty email"; - if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) - return "Bad characters in email"; - } -} - -module.exports = checkNameEmail;