form icon indicating copy to clipboard operation
form copied to clipboard

Unable to display Validation Messages with Zod in Next.js

Open mariusraupach opened this issue 1 year ago • 4 comments

Describe the bug

I am encountering an issue in my Next.js project where I am unable to display validation messages. Although the field.form.state.errors property correctly contains the errors, the field.state.meta.errors property is empty. For validation, I am using Zod.

Your minimal, reproducible example

https://codesandbox.io/p/github/mariusraupach/curly-fiesta/main?import=true&embed=1

Steps to reproduce

  1. Enter a value that is not an email address into the input field.

Expected behavior

As a user, I expected to see a validation message indicating that the value must be an email address.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

  • OS: macOS 14.5
  • Browser: Google Chrome - Version 126.0.6478.127 (Official Build) (arm64)

TanStack Form adapter

None

TanStack Form version

0.26.4

TypeScript version

5.5.3

Additional context

No response

mariusraupach avatar Jul 15 '24 21:07 mariusraupach