From 16e95a2bcea38e0de07c285d73ef6a6a07f4b468 Mon Sep 17 00:00:00 2001 From: ido Date: Mon, 18 Dec 2023 18:35:14 +0200 Subject: [PATCH] fix: remove @astro-utils/formidable deps --- packages/forms/src/components/form-utils/validate.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/forms/src/components/form-utils/validate.ts b/packages/forms/src/components/form-utils/validate.ts index 1115d54..81ed690 100644 --- a/packages/forms/src/components/form-utils/validate.ts +++ b/packages/forms/src/components/form-utils/validate.ts @@ -1,10 +1,9 @@ -import { isFormidableFile } from "@astro-utils/formidable"; -import { z } from "zod"; -import AboutFormName from "../form-utils/about-form-name.js"; +import {z} from 'zod'; +import AboutFormName from '../form-utils/about-form-name.js'; function validateEmptyFile(about: AboutFormName){ const value = about.formValue; - return isFormidableFile(value) && value.size == 0; + return value instanceof File && value.size == 0; } export function validateRequire(about: AboutFormName, required: boolean){