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

fix(conform-zod): multi select coercion #447

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

edmundhung
Copy link
Owner

This makese zod coerce a multi select with empty value option correctly and returns nonEmpty message from items instead of required from items[0].

const schema = z.object({
  items: z.string().array().nonEmpty('At least one item is required')
});

@edmundhung edmundhung merged commit 56b159f into main Feb 12, 2024
3 checks passed
@edmundhung edmundhung deleted the fix-multi-select-coercion branch February 12, 2024 23:19
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.

None yet

1 participant