Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/actions/isoWeek/isoWeek.ts>isoWeek

The modular and type safe schema library for validating structural data 🤖
Latest
function isoWeek
import { isoWeek } from "https://deno.land/x/valibot@v1.0.0-beta.1-i18n/src/actions/isoWeek/isoWeek.ts";

Creates an ISO week validation action.

Format: yyyy-Www

Hint: The regex used cannot validate the maximum number of weeks based on the year. For example, "2021W53" is valid although 2021 has only 52 weeks.

Type Parameters

TInput extends string

Returns

IsoWeekAction<TInput, undefined>

An ISO week action.

Creates an ISO week validation action.

Format: yyyy-Www

Hint: The regex used cannot validate the maximum number of weeks based on the year. For example, "2021W53" is valid although 2021 has only 52 weeks.

Type Parameters

TInput extends string
TMessage extends ErrorMessage<IsoWeekIssue<TInput>> | undefined

Parameters

message: TMessage

The error message.

Returns

An ISO week action.