Skip to content

fix: preserve standard schema root errors#849

Open
pupuking723 wants to merge 1 commit into
react-hook-form:masterfrom
pupuking723:fix/standard-schema-root-errors
Open

fix: preserve standard schema root errors#849
pupuking723 wants to merge 1 commit into
react-hook-form:masterfrom
pupuking723:fix/standard-schema-root-errors

Conversation

@pupuking723

Copy link
Copy Markdown

Fixes #841

Proposed Changes

  • Preserve Standard Schema issues that do not provide a path by mapping them to errors.root
  • Keep criteriaMode: "all" behavior for multiple root-level issues
  • Add regression coverage for missing-path Standard Schema issues

Verification:

  • /Users/mac/.bun/bin/bun test ./standard-schema/src/__tests__/standard-schema.ts -t root
  • /Users/mac/.bun/bin/bun lint
  • /Users/mac/.bun/bin/bun run lint:types
  • /Users/mac/.bun/bin/bun run build:standard-schema
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue: Improper handling of errors with empty path in Standard Schema

1 participant