Type Alias: UrlValidationOptions
type UrlValidationOptions = Except<IsURLOptions, "disallow_auth"> & {
allowBackticks?: boolean;
allowSingleQuotes?: boolean;
disallowAuth?: boolean;
};
Defined in: shared/validation/validatorUtils.ts:67
Options for isValidUrl.
Type Declarationโ
allowBackticks?โ
readonly optional allowBackticks?: boolean;
Allow backticks in the URL string (disabled by default).
allowSingleQuotes?โ
readonly optional allowSingleQuotes?: boolean;
Allow single quotes in the URL string.
Remarksโ
The default validation policy is intentionally strict for URLs that may be embedded into logs or UI attributes. Some internal-only URLs (for example monitor endpoints) may legitimately include quotes in the path component.
disallowAuth?โ
readonly optional disallowAuth?: boolean;
Lint-friendly alias for validator's disallow_auth.
Remarksโ
validator.js uses snake_case options (e.g. disallow_auth). This codebase
enforces camelCase identifiers, so we also accept disallowAuth and map it
to the underlying validator option.