Selegic CRM Docs
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.json

Exports

ExportDescription
.All schemas
./serverServer validation schemas
./clientClient 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

On this page