Skip to content

Commit

Permalink
fix: remove @astro-utils/formidable deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-pluto committed Dec 18, 2023
1 parent a5f0fbd commit 16e95a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/forms/src/components/form-utils/validate.ts
Original file line number Diff line number Diff line change
@@ -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){
Expand Down

0 comments on commit 16e95a2

Please sign in to comment.