Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Zod error messages #1320

Merged
merged 3 commits into from
May 24, 2024
Merged

Improve Zod error messages #1320

merged 3 commits into from
May 24, 2024

Conversation

piotrpospiech
Copy link
Collaborator

@piotrpospiech piotrpospiech commented Apr 20, 2024

  • Add field name to the error message visible in the ErrorsField component
  • Display list field name and proper indexes (recursive)
  • Updated tests

Note

The getLabel function should be updated after we add support for passing custom label.

Before:

image

After:

image

@piotrpospiech piotrpospiech added this to the v4.0 milestone Apr 20, 2024
@piotrpospiech piotrpospiech self-assigned this Apr 20, 2024
@github-actions github-actions bot added Area: Bridge Affects some of the bridge packages Bridge: Zod Affects the uniforms-bridge-zod package labels Apr 20, 2024
@github-actions github-actions bot added the Area: Core Affects the uniforms package label Apr 22, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.57%. Comparing base (4b3f109) to head (824e93f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1320      +/-   ##
==========================================
+ Coverage   94.55%   94.57%   +0.01%     
==========================================
  Files         231      231              
  Lines        3823     3833      +10     
  Branches     1030     1032       +2     
==========================================
+ Hits         3615     3625      +10     
  Misses         82       82              
  Partials      126      126              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the Bridge: JSON Schema Affects the uniforms-bridge-json-schema package label Apr 23, 2024
@github-actions github-actions bot removed the Bridge: JSON Schema Affects the uniforms-bridge-json-schema package label Apr 23, 2024
@piotrpospiech piotrpospiech merged commit a77b8e2 into master May 24, 2024
12 checks passed
@piotrpospiech piotrpospiech deleted the zod-error-messages branch May 24, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Bridge Affects some of the bridge packages Area: Core Affects the uniforms package Bridge: Zod Affects the uniforms-bridge-zod package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants