projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revise server code + a few fixes in trnalsations and ComputerGame
[vchess.git]
/
client
/
src
/
data
/
challengeCheck.js
diff --git
a/client/src/data/challengeCheck.js
b/client/src/data/challengeCheck.js
index
789952f
..
a535b88
100644
(file)
--- a/
client/src/data/challengeCheck.js
+++ b/
client/src/data/challengeCheck.js
@@
-10,12
+10,12
@@
export function checkChallenge(c) {
// Basic alphanumeric check for opponent name
if (c.to) {
// NOTE: slightly redundant (see data/userCheck.js)
// Basic alphanumeric check for opponent name
if (c.to) {
// NOTE: slightly redundant (see data/userCheck.js)
- if (!c.to.match(/^[\w]+$/)) return "
Wrong characters in opponent nam
e";
+ if (!c.to.match(/^[\w]+$/)) return "
Name: alphanumerics and underscor
e";
}
// Allow custom FEN (and check it) only for individual challenges
if (c.fen.length > 0 && !!c.to) {
}
// Allow custom FEN (and check it) only for individual challenges
if (c.fen.length > 0 && !!c.to) {
- if (!V.IsGoodFen(c.fen)) return "
Bad FEN string
";
+ if (!V.IsGoodFen(c.fen)) return "
Errors in FEN
";
} else c.fen = "";
return "";
} else c.fen = "";
return "";