This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/modelSchema/common/id.ts
Dominik Pschenitschni 8a5017b2d6
All checks were successful
continuous-integration/drone/pr Build is passing
feat: add zod schemas
2022-09-13 17:11:49 +02:00

6 lines
143 B
TypeScript

import { number, preprocess } from 'zod'
export const IdSchema = preprocess(
(value: unknown) => Number(value),
number().positive().int(),
)