mirror of
https://github.com/theoludwig/react-component-form.git
synced 2024-07-17 07:30:13 +02:00
11 lines
315 B
TypeScript
11 lines
315 B
TypeScript
import { Static, 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>
|