Skip to content

Valibot bundle size is 78.5kb? #1040

Closed Answered by fabian-hiller
Enkratia asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Enkratia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants