Valibot bundle size is 78.5kb? #1040
-
Is it true? This statement is no longer relevant?:
|
Beta Was this translation helpful? Give feedback.
Answered by
fabian-hiller
Jan 30, 2025
Replies: 1 comment
-
Hey, this is still true. Feel free to copy both code examples into this website and press "build": https://bundlejs.com/ Valibot: import * as v from 'valibot';
const LoginSchema = v.object({
email: v.pipe(
v.string(),
v.nonEmpty('Please enter your email.'),
v.email('The email address is badly formatted.')
),
password: v.pipe(
v.string(),
v.nonEmpty('Please enter your password.'),
v.minLength(8, 'Your password must have 8 characters or more.')
),
}); Zod: import { object, string } from 'zod';
const LoginSchema = object({
email: string()
.min(1, 'Please enter your email.')
.email('The email address is badly formatted.'),
password: string()
.min(1, 'Please enter your password.')
.min(8, 'Your password must have 8 characters or more.'),
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Enkratia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, this is still true. Feel free to copy both code examples into this website and press "build": https://bundlejs.com/
Valibot:
Zod: