X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fdata%2FproblemCheck.js;h=b9fe04dfc094e1c1a7eeea0f3e4792c3895b9e38;hb=032312bfa24f306e84645645f76d40773149ac49;hp=d0978cbcc1dc97e9b32702a438e8a6c0c241f2a9;hpb=b638a2e74e947ac30933a1903d1bb78f4886cd45;p=vchess.git diff --git a/client/src/data/problemCheck.js b/client/src/data/problemCheck.js index d0978cbc..b9fe04df 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 "Empty instructions"; + + if (p.solution.trim().length == 0) return "Empty solution"; + return ""; }