19 lines
531 B
TypeScript
19 lines
531 B
TypeScript
import { z } from "zod"
|
|
|
|
import { phoneValidator } from "@/utils/phoneValidator"
|
|
|
|
export const editProfileSchema = z.object({
|
|
"address.country": z.string().min(1),
|
|
"address.city": z.string().optional(),
|
|
"address.streetAddress": z.string().optional(),
|
|
"address.zipCode": z.string().min(1),
|
|
dateOfBirth: z.string().min(1),
|
|
email: z.string().email(),
|
|
phoneNumber: phoneValidator(
|
|
"Phone is required",
|
|
"Please enter a valid phone number"
|
|
),
|
|
})
|
|
|
|
export type EditProfileSchema = z.infer<typeof editProfileSchema>
|