This repository has been archived on 2024-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
react-component-form/example/models/User.ts

12 lines
355 B
TypeScript
Raw Normal View History

import type { Static } from '@sinclair/typebox'
import { Type } from '@sinclair/typebox'
2022-08-26 20:19:31 +02:00
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>