Click on buttons: "test undefined" , "test to small" , and "test to big"
See that the message of the error is not showing what the errorMap function is always returning ("correct msg")
See that(only as info) old packages and updated packages codesandbox'es have different behavior: the old version is showing the incorrect error msg also when clicking on the test undefined button
Expected behavior
I would expect that every error message would equal to what was specified in the errorMap function.
The errorMap function is not always replacing the message in the formState.errors object
Codesandbox link (Required)
The link to the old version of the resolver example (old packages): https://codesandbox.io/s/react-hook-form-zod-resolver-example-forked-fcz3g6
The link to the new version of the resolver example (updated packages): https://codesandbox.io/s/react-hook-form-zod-resolver-example-forked-updated-2zw4x9
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect that every error message would equal to what was specified in the errorMap function.
The result of the tests (clicking on the buttons) that i'm currently getting:
What i would expect after clicking on the buttons: