Skip to content

wesleydmscn/zcn

image

zcn/zod

A set of ready-made schemas extended for Zod by @wesleydmscn

License npm version Downloads Issues PRs Welcome GitHub Stars

Installation

npm install zcn
# or
pnpm install zcn
# or
yarn install zcn

Features

  • Validation integrated with Zod v4
  • Ready for Node.js, React, Next.js, NestJS, etc.
  • Easy to import and use directly with Zod schemas

Built to enhance Zod standard validations, zcn integrates seamlessly into your projects the same way you’d use Zod.

Basic usage

You just need to define a schema and use custom validations. For the purposes of this guide, we'll use a simple object schema:

import { z } from "zcn";

const Customer = z.object({
  name: z.string().nonempty(),
  cpf: z.cpf({ error: "Invalid CPF" }),
  telephone: z.telephone(),
});

Docs

You can see examples of each ready-made schema, how to use the library, and other information directly on the Wiki.

About

A set of ready-made schemas extended for Zod. 🤘🏻

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors