19 lines
375 B
TypeScript
19 lines
375 B
TypeScript
import { z } from "zod"
|
|
|
|
export const signInSchema = z.object({
|
|
username: z
|
|
.string()
|
|
.min(1, {
|
|
error: "Invalid username"
|
|
})
|
|
.nonempty("Username is required"),
|
|
password: z
|
|
.string()
|
|
.min(3, {
|
|
error: "Password is too short"
|
|
})
|
|
.nonempty("Password is required"),
|
|
})
|
|
|
|
export type SignInFormType = z.infer<typeof signInSchema>
|