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

[effect-ts] Only the last issue per field is reported #721

Open
hannesj opened this issue Oct 23, 2024 · 0 comments
Open

[effect-ts] Only the last issue per field is reported #721

hannesj opened this issue Oct 23, 2024 · 0 comments

Comments

@hannesj
Copy link

hannesj commented Oct 23, 2024

Describe the bug
If the filed is a union, only the last issue is reported. This can be cumbersome especially with optional fields, which are just unions with undefined.

To Reproduce
Create a Schema which will produce multiple ParseIssues for a single filed

Codesandbox link (Required)
https://codesandbox.io/p/sandbox/react-hook-form-validationschema-v6-forked-nwp2d2

Expected behavior
The error should contain the error "Please enter a valid phone number in international format." when submit is clicked.

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

No branches or pull requests

1 participant