Skip to main content
Module

x/leaves/mod.ts>validator.isISO8601

A Web framework For Deno with Decorator and middleware
Latest
function validator.isISO8601
import { validator } from "https://deno.land/x/leaves@v0.1.5/mod.ts";
const { isISO8601 } = validator;

Checks if the string is a valid ISO 8601 date. If given value is not a string, then it returns false. Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.

Parameters

value: unknown
optional
options: ValidatorJS.IsISO8601Options

Returns

boolean