diff --git a/lib/client/storyFormSchema.ts b/lib/client/storyFormSchema.ts index 358eaa6..df70dfa 100644 --- a/lib/client/storyFormSchema.ts +++ b/lib/client/storyFormSchema.ts @@ -26,7 +26,7 @@ export const cs = yup.object().shape({ }), hidden: yup.boolean().oneOf([true, false]), pot: yup.string().oneOf(["pasteOrType", "upload"]).required("Story content is required!"), - storytext: yup.string().when("pot", ([pot], schema) => { + content: yup.string().when("pot", ([pot], schema) => { return pot === "pasteOrType" ? schema .test("numWords", "Story must be at least 50 words", (value: any, context) => { @@ -56,7 +56,7 @@ export const cs = yup.object().shape({ } else { ext = (value as File)?.name?.split(".").reverse()[0]; } - // + // let reg = /(docx|doc)$/i; return reg.test(ext); },