X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fshared%2FuserCheck.js;fp=public%2Fjavascripts%2Fshared%2FuserCheck.js;h=0000000000000000000000000000000000000000;hp=65ed1db8a12e848edb04b57dd62b562d3c4dcf93;hb=625022fdcf750f0aff8fcd699f7e9b89730e1d10;hpb=b955c65b942d09d24b5c3bed0d755d4f2f8f71f1 diff --git a/public/javascripts/shared/userCheck.js b/public/javascripts/shared/userCheck.js deleted file mode 100644 index 65ed1db8..00000000 --- a/public/javascripts/shared/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"; - } -} - -try { module.exports = checkNameEmail; } catch(e) { } //for server