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

Remove duplicated block on custom error messages #758

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

5minpause
Copy link
Contributor

@5minpause 5minpause commented Nov 11, 2021

Almost the same block on custom error messages can be found in lines 336–345.

const name = z.string({
  required_error: "Name is required",
  invalid_type_error: "Name must be a string",
});

Leaves the question whether the properties in that object can be both =>
required/required_error and invalid/invalid_type_error

@colinhacks
Copy link
Owner

Wow good catch. invalid and required aren't actually supported at all...only required_error and invalid_type_error.

@colinhacks colinhacks merged commit 73a9a62 into colinhacks:master Dec 30, 2021
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.

2 participants