Options for URL validation.

interface IsURLOptions {
    allowFragments?: boolean;
    allowQueryComponents?: boolean;
    allowWildcard?: boolean;
    requireTld?: boolean;
}

Properties

allowFragments?: boolean

Allows URL fragments (e.g., #fragment) if true. Defaults to false.

allowQueryComponents?: boolean

Allows query components (e.g., ?query=value) if true. Defaults to false.

allowWildcard?: boolean

Allows wildcard domains (e.g., *.example.com) if true. Defaults to false.

requireTld?: boolean

Requires a Top-Level Domain (TLD) if true. Defaults to true.