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

Multiple uri validation #3020

Open
seungho-hub opened this issue Feb 26, 2024 · 2 comments
Open

Multiple uri validation #3020

seungho-hub opened this issue Feb 26, 2024 · 2 comments
Labels
feature New functionality or improvement

Comments

@seungho-hub
Copy link

seungho-hub commented Feb 26, 2024

What problem are you trying to solve?

i try to validate multiple uri in a string that separate by comma( , )

I found a very similar pr

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,
})
@seungho-hub seungho-hub added the feature New functionality or improvement label Feb 26, 2024
@Marsup
Copy link
Collaborator

Marsup commented Feb 26, 2024

IMHO email made sense because there are standards that take multiple emails this way, can you mention a standard taking multiple uris?

@seungho-hub
Copy link
Author

seungho-hub commented Feb 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

2 participants