1141-line lib/validations.ts → lib/validations/<feature>.ts + primitives.ts + an index.ts barrel. '@/lib/validations' now resolves to the barrel, so all 40 importers are untouched. Every one of the 143 exports is preserved verbatim (verified by symbol-diff); schemas moved unchanged. tsc 0, 635 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 lines
522 B
TypeScript
15 lines
522 B
TypeScript
import { z } from 'zod'
|
|
import { flexibleDateTime } from './primitives'
|
|
|
|
export const logCashPaymentSchema = z.object({
|
|
amount: z.number().positive('Amount must be positive'),
|
|
from_note: z.string().min(1, 'Payer note is required').max(500),
|
|
member_id: z.string().uuid('Invalid member ID').optional().nullable(),
|
|
transaction_date: flexibleDateTime().optional(),
|
|
})
|
|
|
|
export const linkPaymentSchema = z.object({
|
|
paymentId: z.string().uuid('Invalid payment ID'),
|
|
memberId: z.string().uuid('Invalid member ID'),
|
|
})
|