Files
next-go-blog/lib/schemas/register.ts
Beyhan Oğur 6d95e27114 first commit
2026-04-26 22:16:43 +03:00

14 lines
517 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { z } from "zod";
export const registerSchema = z.object({
username: z.string().min(3, "Kullanıcı adı en az 3 karakter olmalıdır"),
email: z.string().email("Geçerli bir email adresi giriniz"),
password: z.string().min(6, "Şifre en az 6 karakter olmalıdır"),
confirmPassword: z.string()
}).refine((data) => data.password === data.confirmPassword, {
message: "Şifreler eşleşmiyor",
path: ["confirmPassword"],
});
export type RegisterSchema = z.infer<typeof registerSchema>;