Skip to content

Releases: mantinedev/mantine-form-zod-resolver

1.3.0

17 Jun 09:36
Compare
Choose a tag to compare

Add zod 4 mini support

1.2.0

26 May 05:33
Compare
Choose a tag to compare

Zod 4 support

This minor release provides support for zod 4.

To use the package with zod 4:

  • Update mantine-form-zod-resolver to 1.2.1
  • Update zod to version 3.25.0 or later
  • Replace zod imports with zod/v4
  • Replace zodResolver with zod4Resolver in your code

Example with zod 4

const schema = z.object({
  name: z.string().min(2, { message: 'Name should have at least 2 letters' }),
  email: z.email({ message: 'Invalid email' }),
  age: z.number().min(18, { message: 'You must be at least 18 to create an account' }),
});

const form = useForm({
  initialValues: {
    name: '',
    email: '',
    age: 16,
  },
  validate: zod4Resolver(schema),
})