From 467b956d7d0c80b57754b0cf42b5523ed46875e1 Mon Sep 17 00:00:00 2001 From: Ahmed Zougari Date: Tue, 18 Jun 2024 23:30:12 +0100 Subject: [PATCH] chore(valibot): change minLength with nonEmpty --- .../src/routes/demo/integration/modular-forms/index.tsx | 4 ++-- .../src/routes/docs/integrations/modular-forms/index.mdx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/docs/src/routes/demo/integration/modular-forms/index.tsx b/packages/docs/src/routes/demo/integration/modular-forms/index.tsx index f15a5d77250..96d6b110c25 100644 --- a/packages/docs/src/routes/demo/integration/modular-forms/index.tsx +++ b/packages/docs/src/routes/demo/integration/modular-forms/index.tsx @@ -9,12 +9,12 @@ import * as v from 'valibot'; const LoginSchema = v.object({ email: v.pipe( v.string(), - v.minLength(1, 'Please enter your email.'), + v.nonEmpty('Please enter your email.'), v.email('The email address is badly formatted.') ), password: v.pipe( v.string(), - v.minLength(1, 'Please enter your password.'), + v.nonEmpty('Please enter your password.'), v.minLength(8, 'Your password must have 8 characters or more.') ), }); diff --git a/packages/docs/src/routes/docs/integrations/modular-forms/index.mdx b/packages/docs/src/routes/docs/integrations/modular-forms/index.mdx index ee4fd5375c6..ac029d1b2fc 100644 --- a/packages/docs/src/routes/docs/integrations/modular-forms/index.mdx +++ b/packages/docs/src/routes/docs/integrations/modular-forms/index.mdx @@ -43,12 +43,12 @@ import * as v from 'valibot'; const LoginSchema = v.object({ email: v.pipe( v.string(), - v.minLength(1, 'Please enter your email.'), + v.nonEmpty('Please enter your email.'), v.email('he email address is badly formatted.'), ), password: v.pipe( v.string(), - v.minLength(1, 'Please enter your password.'), + v.nonEmpty('Please enter your password.'), v.minLength(8, 'Your password must have 8 characters or more.'), ), }); @@ -190,12 +190,12 @@ import * as v from 'valibot'; const LoginSchema = v.object({ email: v.pipe( v.string(), - v.minLength(1, 'Please enter your email.'), + v.nonEmpty('Please enter your email.'), v.email('The email address is badly formatted.'), ), password: v.pipe( v.string(), - v.minLength(1, 'Please enter your password.'), + v.nonEmpty('Please enter your password.'), v.minLength(8, 'Your password must have 8 characters or more.'), ), });