joi
joi copied to clipboard
Multiple uri validation
What problem are you trying to solve?
i try to validate multiple uri in a string that separate by comma( ,
)
so i expect uri({multiple : true})
but it does not exist.
There may be other solutions but I think this is a pretty consistent feature considering email({ multiple : true }).
Do you have a new or modified API suggestion to solve the problem?
joi.string().uri()
joi.string().uri({
multiple: true,
})
IMHO email made sense because there are standards that take multiple emails this way, can you mention a standard taking multiple uris?
Thank you for your reply 😃
definitely the idea of seperating uri with comma is a terrible thing
instead of comma, RFC 3986 recommends some ways to delimiting uri in context in appendix-C.