Replies: 1 comment 5 replies
-
Instead of optional what you are probably after is a union with the empty string? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm running into an issue using
zod
withreact-hook-form
where I set a field to optional and that it should be a URL if added but it is requiring it no matter what I do unless I remove it.If I remove .URL() then it works and doesn't require the field to be filled.
Beta Was this translation helpful? Give feedback.
All reactions