Skip to main content
Module

x/valibot/mod.ts>url

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function url
import { url } from "https://deno.land/x/valibot@v0.23.0/mod.ts";

Creates a validation function that validates a URL.

Hint: The value is passed to the URL constructor to check if it is valid. This check is not perfect. For example, values like "abc:1234" are accepted.

Type Parameters

TInput extends string

Parameters

optional
message: ErrorMessage = [UNSUPPORTED]

The error message.

Returns

A validation function.