Skip to content

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

@fogine

Description

@fogine

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions