X-Git-Url: https://git.auder.net/images/pieces/%22%20%20V.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FproblemCheck.js;h=8ee101f3aa36b3d06cd1a7984b473ab5c836f993;hb=01ad8e179268dc62efef0823edde2b09236f9476;hp=b9fe04dfc094e1c1a7eeea0f3e4792c3895b9e38;hpb=032312bfa24f306e84645645f76d40773149ac49;p=vchess.git diff --git a/client/src/data/problemCheck.js b/client/src/data/problemCheck.js index b9fe04df..8ee101f3 100644 --- a/client/src/data/problemCheck.js +++ b/client/src/data/problemCheck.js @@ -1,12 +1,12 @@ export function checkProblem(p) { - const vid = parseInt(p.vid); + const vid = parseInt(p.vid, 10); if (isNaN(vid) || vid <= 0) return "Please select a variant"; if (!V.IsGoodFen(p.fen)) return "Errors in FEN"; - if (p.instruction.trim().length == 0) return "Empty instructions"; + if (p.instruction.trim().length == 0) return "Missing instructions"; - if (p.solution.trim().length == 0) return "Empty solution"; + if (p.solution.trim().length == 0) return "Missing solution"; return ""; }