@timeback/core 0.2.4-beta.20260331232130 → 0.2.4-beta.20260401223329
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.
|
@@ -224,6 +224,13 @@ var StringTimebackGrade = z.string().transform((value, ctx) => {
|
|
|
224
224
|
return z.NEVER;
|
|
225
225
|
}
|
|
226
226
|
const stripped = raw.replace(/\bgrade\b/g, "").replace(/(\d+)(st|nd|rd|th)\b/g, "$1").trim();
|
|
227
|
+
if (stripped === "") {
|
|
228
|
+
ctx.addIssue({
|
|
229
|
+
code: "custom",
|
|
230
|
+
message: "must be a valid Timeback grade"
|
|
231
|
+
});
|
|
232
|
+
return z.NEVER;
|
|
233
|
+
}
|
|
227
234
|
if (stripped === "pre-k" || stripped === "pk") {
|
|
228
235
|
return -1;
|
|
229
236
|
}
|
package/dist/index.js
CHANGED
package/dist/utils.js
CHANGED