ServerSchema
Overview
Shared Valibot schemas for server and client validation.
@repo/crm-schema provides shared Valibot schemas for type-safe validation across the monorepo.
Package Structure
packages/crm/schema/
├── src/
│ ├── index.ts # Main exports
│ ├── server/ # Server-specific schemas
│ └── client/ # Client-specific schemas
└── package.jsonExports
| Export | Description |
|---|---|
. | All schemas |
./server | Server validation schemas |
./client | Client validation schemas |
Usage
import { ContactCreateSchema } from "@repo/crm-schema";
// Validate input
const result = ContactCreateSchema.parse(input);
// Get inferred type
type ContactInput = typeof ContactCreateSchema.infer;Quick Navigation
- Authoring Schemas — Creating new schemas
- Validation — Using schemas for validation