-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docs): update valibot snippet #6569
Conversation
👷 Deploy request for qwik-insights pending review.Visit the deploys page to approve it
|
const LoginSchema = object({
email: string([
minLength(1, 'Please enter your email.'),
email('The email address is badly formatted.'),
]),
password: string([
minLength(1, 'Please enter your password.'),
minLength(8, 'Your password must have 8 characters or more.'),
]),
}); I'm not a Valibot expert but this snippet from docs gives this error:
When I wrote it that way 👇. The error removed but I'm not sure if it's the same thing. const LoginSchema = object({
email: pipe(
string(),
minLength(1, 'Please enter your email'),
email('he email address is badly formatted'),
),
password: pipe(
string(),
minLength(1, 'Please enter your password.'),
minLength(8, 'Your password must have 8 characters or more.'),
),
}) |
@fabian-hiller you are the master here 😄 can you have a look pls? |
Thanks @zougari47! Can you also change the imports to |
Done ✅. Thank you for the recomandation. |
Can you also update this file? https://github.com/QwikDev/qwik/blob/main/packages/docs/src/routes/demo/integration/modular-forms/index.tsx |
Run & review this pull request in StackBlitz Codeflow. commit: @builder.io/qwik
@builder.io/qwik-city
eslint-plugin-qwik
create-qwik
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zougari47 for your help and @fabian-hiller for the review 👏
One last thing. Can you change |
Done ✅. Thank you for the review. |
Overview
What is it?
Description
I was trying to implement modular forms like on docs but when I installed
valibot
^0.32.0 found there is no exported typeInput
(I think it's outdated).When I looked in
valibot
docs they useInferOutput
instead.Use cases and why
Checklist: