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

Typo in the doc? #1

Closed
rackaam opened this issue Mar 12, 2020 · 1 comment
Closed

Typo in the doc? #1

rackaam opened this issue Mar 12, 2020 · 1 comment

Comments

@rackaam
Copy link

rackaam commented Mar 12, 2020

Hi!

Awesome work on this lib, I was waiting for years for someone to tackle this problem ;)

const dogsList = z.array(dogSchema);

dogsList.parse([
  { name: "Cujo", neutered: null },
  { name: "Fido", age: 4, neutered: true },
]) // passes

dogsList.parse([]) // passes

I believe this shouldn't pass because of the lack of age in the first item right?

@colinhacks
Copy link
Owner

Very true - fixed!

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

2 participants