Skip to content

issue: error in Array schemas don't surface #126

@bastibuck

Description

@bastibuck

Version Number

1.8.0

Codesandbox/Expo snack

https://codesandbox.io/s/react-ts-form-example-forked-38ykmt?file=/src/App.tsx

Steps to reproduce

  1. Click submit without checking a checkbox
  2. Data is being logged
  3. Check a checkbox, no error is still visible although the validation should fail (due to uuid())
  4. Click submit, data is not being logged

The issue is that errors coming from zod don't seem to surface into the error coming from useTsController(). The submit is disabled correctly but no error can be shown.

If you remove the uuid() part the submit works fine.

Expected behaviour

Array schema validation errors should also surface when using useTsController inside a field component.

Maybe I'm just doing something wrong but the codesandbox and my local solution provide just the same output where the error is never changed on actual falsy inputs.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions