Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno_class_validator/src/index.ts>isIdentityCard

Decorator-based property validation for classes.
Latest
function isIdentityCard
import { isIdentityCard } from "https://deno.land/x/deno_class_validator@v1.0.0/src/index.ts";

Check if the string is a valid identity card code. locale is one of ['ES', 'zh-TW', 'he-IL', 'ar-TN'] OR 'any'. If 'any' is used, function will check if any of the locals match. Defaults to 'any'. If given value is not a string, then it returns false.

Parameters

value: unknown
locale: ValidatorJS.IdentityCardLocale

Returns

boolean