Files
stock-manager/src/schemas/auth.schema.ts
T

19 lines
373 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>