X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FproblemCheck.js;h=d6b916cf14016cfa0750fabd7055acb0dc8536b7;hb=13ce1e9b92741e6dc1c0241bb001272090bb0e15;hp=d0978cbcc1dc97e9b32702a438e8a6c0c241f2a9;hpb=866842c3c310524c034922870234120ed2a16cbf;p=vchess.git diff --git a/client/src/data/problemCheck.js b/client/src/data/problemCheck.js index d0978cbc..d6b916cf 100644 --- a/client/src/data/problemCheck.js +++ b/client/src/data/problemCheck.js @@ -4,5 +4,9 @@ export function checkProblem(p) { 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 ""; }