I'm using Joi validation in React with this schema:
...
intro_video_link:
Joi.string()
.uri()
.label("Intro Video"),
...
The intro_video_link
is also required. I want Joi to validate field for uri if it is filled, but also allow it to be empty. There is no .required()
called.
How?
Thank you