projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better menu ordering ?
[vchess.git]
/
client
/
src
/
data
/
challengeCheck.js
diff --git
a/client/src/data/challengeCheck.js
b/client/src/data/challengeCheck.js
index
1a8b9fe
..
626b7cf
100644
(file)
--- a/
client/src/data/challengeCheck.js
+++ b/
client/src/data/challengeCheck.js
@@
-6,14
+6,14
@@
export function checkChallenge(c)
if (isNaN(vid) || vid <= 0)
return "Please select a variant";
if (isNaN(vid) || vid <= 0)
return "Please select a variant";
- const tc = extractTime(c.
timeControl
);
+ const tc = extractTime(c.
cadence
);
if (!tc)
return "Wrong time control";
// Basic alphanumeric check for opponent name
if (!!c.to)
{
if (!tc)
return "Wrong time control";
// Basic alphanumeric check for opponent name
if (!!c.to)
{
- //
TODO
: slightly redundant (see data/userCheck.js)
+ //
NOTE
: slightly redundant (see data/userCheck.js)
if (!c.to.match(/^[\w]+$/))
return "Wrong characters in opponent name";
}
if (!c.to.match(/^[\w]+$/))
return "Wrong characters in opponent name";
}