🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@br-validators/zod

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@br-validators/zod

Zod schemas for Brazilian document validators — delegates to @br-validators/core

latest
Source
npmnpm
Version
1.10.0
Version published
Weekly downloads
2.1K
Maintainers
1
Weekly downloads
 
Created
Source

@br-validators/zod

npm MIT GitHub release

Zod schemas that delegate to @br-validators/core v1.10.0 validate* functions — same golden vectors, same error messages.

Install

pnpm add @br-validators/zod @br-validators/core zod

Peer dependency: zod ^3.23.0 || ^4.0.0

Usage

import { z } from 'zod';
import { cpfSchema, telefoneSchema } from '@br-validators/zod';

const formSchema = z.object({
  cpf: cpfSchema,
  telefone: telefoneSchema,
});

formSchema.parse({
  cpf: '123.456.789-09',
  telefone: '(11) 99999-9999',
});

Exports

SchemaOutput
cpfSchemacanonical string
cnpjSchemacanonical string
cepSchemacanonical string
telefoneSchema{ value, tipo }
placaSchema{ value, format }
pisPasepSchema / pisSchemacanonical string
pixKeySchema{ value, keyType }
boletoSchema{ value, inputKind, situacao }
cartaoCreditoSchema{ value, brand }
createInscricaoEstadualSchema({ uf }){ value, uf }

Subpath imports mirror core: @br-validators/zod/cpf, etc.

License

MIT

Keywords

brazil

FAQs

Package last updated on 27 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts