export const UploadFileSchema = yup.object().shape({
file: yup
.mixed()
.required("You need to provide a file")
.test("fileSize", "The file is too large", (value) => {
return value && value[0].sienter code hereze <= 2000000;
})
.test("type", "Only the following formats are accepted: .jpeg, .jpg, .bmp, .pdf and .doc", (value) => {
return value && (
value[0].type === "image/jpeg" ||
value[0].type === "image/bmp" ||
value[0].type === "image/png" ||
value[0].type === 'application/pdf' ||
value[0].type === "application/msword"
);
}),
});