feat(WEB-220): label translations
This commit is contained in:
@@ -1,25 +1,17 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
import { phoneValidator } from "@/utils/phoneValidator"
|
||||
|
||||
export const editProfileSchema = z.object({
|
||||
"address.country": z
|
||||
.string({ required_error: _("Country is required") })
|
||||
.min(1, { message: _("Country is required") }),
|
||||
"address.country": z.string().min(1),
|
||||
"address.city": z.string().optional(),
|
||||
"address.streetAddress": z.string().optional(),
|
||||
"address.zipCode": z
|
||||
.string({ required_error: _("Zip code is required") })
|
||||
.min(1, { message: _("Zip code is required") }),
|
||||
dateOfBirth: z
|
||||
.string({ required_error: _("Date of Birth is required") })
|
||||
.min(1, { message: _("Date of Birth is required") }),
|
||||
"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")
|
||||
"Phone is required",
|
||||
"Please enter a valid phone number"
|
||||
),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user