feat(frontend): Clean-up schemas, remove dead code, move types
This commit is contained in:
22
legalconsenthub/types/schemas.ts
Normal file
22
legalconsenthub/types/schemas.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as z from 'zod'
|
||||
|
||||
export const signUpSchema = z.object({
|
||||
name: z.string().min(1, 'Name is required'),
|
||||
email: z.string().email('Invalid email'),
|
||||
password: z.string().min(8, 'Must be at least 8 characters')
|
||||
})
|
||||
|
||||
export const signInSchema = z.object({
|
||||
email: z.string().email('Invalid email'),
|
||||
password: z.string().min(8, 'Must be at least 8 characters')
|
||||
})
|
||||
|
||||
export const organizationSchema = z.object({
|
||||
name: z.string().min(2, 'Too short'),
|
||||
slug: z.string().min(2, 'Too short'),
|
||||
logo: z.string().optional()
|
||||
})
|
||||
|
||||
export type SignUpSchema = z.output<typeof signUpSchema>
|
||||
export type SignInSchema = z.output<typeof signInSchema>
|
||||
export type OrganizationSchema = z.output<typeof organizationSchema>
|
||||
Reference in New Issue
Block a user