From 446d600a2171eb62ef74fcd9c48e054d57727e39 Mon Sep 17 00:00:00 2001 From: Ivan Filho Date: Sun, 12 May 2024 06:00:36 -0300 Subject: [PATCH] docs: update readme --- README.md | 2 +- app/forms/hello/schema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79e27ee..c573be9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ import { z } from 'zod' export const exampleSchema = z.object({ name: z.string().min(3, 'Name must be at least 3 characters'), message: z.string().min(10, 'Message must be at least 10 characters'), - attachment: z.instanceof(File).nullable().optional() + attachment: z.instanceof(File).nullish() }) ``` diff --git a/app/forms/hello/schema.ts b/app/forms/hello/schema.ts index 4736cb6..f715ca4 100644 --- a/app/forms/hello/schema.ts +++ b/app/forms/hello/schema.ts @@ -4,6 +4,6 @@ export const helloSchema = z.object({ name: z.string().min(3, 'Name must be at least 3 characters'), age: z.number().int().min(18, 'You must be at least 18 years old'), message: z.string().min(10, 'Message must be at least 10 characters'), - attachment: z.instanceof(File).nullable().optional(), + attachment: z.instanceof(File).nullish(), terms: z.boolean().refine((value) => value, 'You must accept the terms') })