@vue-skuilder/courseware 0.1.40 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2894,16 +2894,18 @@ var de = /* @__PURE__ */ t(te, [["render", _sfc_render]]), $ = class ChessPuzzle
2894
2894
  validator: {
2895
2895
  instructions: "insert a valid fen string",
2896
2896
  test: function(e) {
2897
- return console.log(`running puzzle validator on ${e}`), e ? e.split(",").length == 10 ? {
2898
- status: x.ok,
2899
- msg: ""
2900
- } : {
2901
- status: x.error,
2902
- msg: "puzzleData must have 8 comma-separated fields"
2903
- } : {
2897
+ if (console.log(`running puzzle validator on ${e}`), !e) return {
2904
2898
  status: x.error,
2905
2899
  msg: "no defined input"
2906
2900
  };
2901
+ let t = e.split(",");
2902
+ return t.length < 10 || t.length > 11 ? {
2903
+ status: x.error,
2904
+ msg: `puzzleData must have 10 or 11 comma-separated fields (got ${t.length})`
2905
+ } : {
2906
+ status: x.ok,
2907
+ msg: ""
2908
+ };
2907
2909
  }
2908
2910
  },
2909
2911
  tagger: () => ["test"]
@@ -2946,4 +2948,4 @@ var de = /* @__PURE__ */ t(te, [["render", _sfc_render]]), $ = class ChessPuzzle
2946
2948
  //#endregion
2947
2949
  export { fe as t };
2948
2950
 
2949
- //# sourceMappingURL=chess-BbHATAzk.js.map
2951
+ //# sourceMappingURL=chess-E2uOAyQS.js.map