Skip to content
Discussion options

You must be logged in to vote

Is this what you are looking for?

const guestUserSchema = z.object( {
    name: z
        .string( { errorMap: () => ( { message: 'Name must be between 3 to 20 characters' } ) } )
        .min( 3 )
        .max( 20 )
} )

If you found my answer satisfactory, please consider supporting me. Even a small amount is greatly appreciated. Thanks friend! 🙏
https://github.com/sponsors/JacobWeisenburger

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by JacobWeisenburger
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mklnz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #3091 on December 31, 2023 19:55.