Something went wrong. Try again.
Extra schema for validating FormData on Zod & Zod mini 4+
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435import type * as z4 from "zod/v4/core";
// FormDataexport type FormDataValidatorInput = FormData;export type FormDataValidatorParams = z4.$ZodShape;
// Textexport type DOMFormDataTextValidatorInput = string;export type DOMFormDataTextValidatorParams = z4.$ZodString<string> | z4.$ZodOptional<z4.$ZodString<string>>;export type DOMFormDataTextValidatorOutput = string | undefined;
// Numericexport type DOMFormDataNumericValidatorInput = string;export type DOMFormDataNumericValidatorParams = z4.$ZodNumber<number>;export type DOMFormDataNumericValidatorOutput = number | undefined;
// Checkboxexport type DOMFormDataCheckboxValidatorInput = boolean | string | undefined;export type DOMFormDataCheckboxValidatorParams = { trueValue?: string };export type DOMFormDataCheckboxValidatorOutput = boolean;
// Checkbox is technically:// z4.$ZodUnion<// [// z4.$ZodPipe<z4.$ZodLiteral<string>, z4.$ZodTransform<boolean, string>>,// z4.$ZodPipe<z4.$ZodLiteral<undefined>, z4.$ZodTransform<boolean, undefined>>,// z4.$ZodBoolean<boolean>,// ]// >;
// Fileexport type DOMFormDataFileValidatorInput = File;export type DOMFormDataFileValidatorParams = z4.$ZodFile;export type DOMFormDataFileValidatorOutput = File | undefined;