We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I get Property 'regex' does not exist on type 'ZodEffects<ZodString, string, string>'
Property 'regex' does not exist on type 'ZodEffects<ZodString, string, string>'
I define the z.strng like this:
z.string({ required_error: 'Username is required', invalid_type_error: 'Name must be a string', }) .refine( (data: string) => data.length > 0, (val: string) => ({ message: 'Username cannot be empty', }), ) .regex(/^[a-zA-Z0-9]+$/, { message: 'Username can only contain alphanumeric characters', }) .min(3, {message: 'Username must be at least 3 characters long'}) .max(20, {message: 'Username cannot exceed 20 characters'})
Could this be because the zod version of the library is outdated? Locally I have zod version 3.23.8
The text was updated successfully, but these errors were encountered:
might be. I'll try to release the updated version this week
Sorry, something went wrong.
Can you please try 1.2.0?
No branches or pull requests
I get
Property 'regex' does not exist on type 'ZodEffects<ZodString, string, string>'
I define the z.strng like this:
Could this be because the zod version of the library is outdated? Locally I have zod version 3.23.8
The text was updated successfully, but these errors were encountered: