projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix computer mode in rules tab
[vchess.git]
/
public
/
javascripts
/
shared
/
userCheck.js
diff --git
a/public/javascripts/shared/userCheck.js
b/public/javascripts/shared/userCheck.js
index
bd282ba
..
65ed1db
100644
(file)
--- a/
public/javascripts/shared/userCheck.js
+++ b/
public/javascripts/shared/userCheck.js
@@
-1,13
+1,13
@@
function checkNameEmail(o)
{
function checkNameEmail(o)
{
- if (
!!o.name
)
+ 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.length == 0)
return "Empty name";
if (!o.name.match(/^[\w]+$/))
return "Bad characters in name";
}
- if (
!!o.email
)
+ if (
typeof o.email === "string"
)
{
if (o.email.length == 0)
return "Empty email";
{
if (o.email.length == 0)
return "Empty email";