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

Question: is it correct to assume that ZodIssue[] will always equal NonEmptyArray<ZodIssue> if the result of safeParse(schema).succes is false? #3721

Open
gerkim62 opened this issue Aug 22, 2024 · 0 comments

Comments

@gerkim62
Copy link

gerkim62 commented Aug 22, 2024

I can't find in the source code what criteria will determine whether to return success as true or false. i want to assume that if issues.length===0 then it returns success as true in which case casting ZodIssue[] as NonEmptyArray would be fine. but i want to be sure instead of checking everytime

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