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

isUrl - host_whitelist array option - support array items containing regex/wildcard value #562

Closed
fogine opened this issue Aug 11, 2016 · 1 comment

Comments

@fogine
Copy link

fogine commented Aug 11, 2016

As the title says, it would be cool if I could do:

validator.isUrl(url, {host_whitelist: [
    /^.*slack\.com$/,
]});

This way I could allow dynamic sub-domains in url strings.

Thanks for sharing your work!

@chriso
Copy link
Collaborator

chriso commented Sep 10, 2016

Happy to accept a PR 😄

@chriso chriso closed this as completed in 8b7afe6 Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants