projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix disconnexion => remove challenges in main Hall
[vchess.git]
/
client
/
src
/
data
/
problemCheck.js
diff --git
a/client/src/data/problemCheck.js
b/client/src/data/problemCheck.js
index
652daae
..
d6b916c
100644
(file)
--- a/
client/src/data/problemCheck.js
+++ b/
client/src/data/problemCheck.js
@@
-2,7
+2,11
@@
export function checkProblem(p) {
const vid = parseInt(p.vid);
if (isNaN(vid) || vid <= 0) return "Please select a variant";
const vid = parseInt(p.vid);
if (isNaN(vid) || vid <= 0) return "Please select a variant";
- if (!V.IsGoodFen(p.fen)) return "Bad FEN string";
+ if (!V.IsGoodFen(p.fen)) return "Errors in FEN";
+
+ if (p.instruction.trim().length == 0) return "Missing instructions";
+
+ if (p.solution.trim().length == 0) return "Missing solution";
return "";
}
return "";
}