vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.93k stars 239 forks source link

Blank field gives error even though optional #1332

Closed dwidge closed 2 days ago

dwidge commented 2 months ago

problem

If the schema is optional with a min length it won't accept it when you type something and then backspace it until empty again.

z.object({ text: z.string().min(1).optional() })

packages

import ZodBridge from "uniforms-bridge-zod";
import { AutoForm } from "uniforms-mui";