1
1
mirror of https://github.com/theoludwig/react-component-form.git synced 2024-07-17 07:30:13 +02:00
react-component-form/example/models/User.ts
Divlo 69f12002c7
build(deps): update latest
BREAKING CHANGE: peerDependencies: `react@>=18.2.0`
2023-04-02 21:52:34 +02:00

12 lines
355 B
TypeScript

import type { Static } from '@sinclair/typebox'
import { Type } from '@sinclair/typebox'
export const userSchema = {
name: Type.String({ minLength: 3, maxLength: 10 }),
email: Type.String({ minLength: 1, maxLength: 254, format: 'email' })
}
export const userObjectSchema = Type.Object(userSchema)
export type User = Static<typeof userObjectSchema>