Skip to main content
Module

x/zod/index.ts>ZodString

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
class ZodString
extends ZodType<string, ZodStringDef>
import { ZodString } from "https://deno.land/x/zod@v3.17.3/index.ts";

Properties

protected
_regex: (
regex: RegExp,
validation: StringValidation,
message?: errorUtil.ErrMessage,
) => unknown
readonly
isCUID
readonly
isEmail
readonly
isURL
readonly
isUUID
readonly
maxLength
readonly
minLength
deprecated
nonempty: (message?: errorUtil.ErrMessage) => unknown
trim: () => unknown

Methods

_addCheck(check: ZodStringCheck)
cuid(message?: errorUtil.ErrMessage)
email(message?: errorUtil.ErrMessage)
length(len: number, message?: errorUtil.ErrMessage)
max(maxLength: number, message?: errorUtil.ErrMessage)
min(minLength: number, message?: errorUtil.ErrMessage)
regex(regex: RegExp, message?: errorUtil.ErrMessage)
url(message?: errorUtil.ErrMessage)
uuid(message?: errorUtil.ErrMessage)

Static Properties

create: (params?: RawCreateParams) => ZodString