Replies: 1 comment
-
|
I recommend to use import * as v from 'valibot';
const UrlSchema = v.union([v.literal(''), v.string([v.maxLength(255), v.url()])]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am running into a problem creating an optional url because an empty string is not considered a valid url. For example:
doesn't seem to accept an empty string (which would be a typical optional value on a web form).
Beta Was this translation helpful? Give feedback.
All reactions