projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix computer games for Apocalypse variant
[vchess.git]
/
client
/
src
/
data
/
userCheck.js
diff --git
a/client/src/data/userCheck.js
b/client/src/data/userCheck.js
index
745d6d6
..
0d3a801
100644
(file)
--- 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") {
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 nam
e";
+ if (o.name.length == 0) return "
Missing
name";
+ if (!o.name.match(/^[\w
-]+$/)) return "Name: alphanumerics, hyphen and underscor
e";
}
if (typeof o.email === "string") {
}
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.length == 0) return "
Missing
email";
+ if (!o.email.match(/^[\w.+-]+@[\w.+-]+$/)) return "
Invalid
email";
}
return "";
}
return "";