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 "";
}