refactor(SW-898): replace signup server action with TRPC
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { countriesMap } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
import { passwordValidator } from "@/utils/passwordValidator"
|
||||
import { phoneValidator } from "@/utils/phoneValidator"
|
||||
import { getMembership } from "@/utils/user"
|
||||
|
||||
export const membershipSchema = z.object({
|
||||
@@ -244,3 +246,20 @@ export const initiateSaveCardSchema = z.object({
|
||||
export const subscriberIdSchema = z.object({
|
||||
subscriberId: z.string(),
|
||||
})
|
||||
|
||||
export const signupPayloadSchema = z.object({
|
||||
language: z.string(),
|
||||
firstName: z.string(),
|
||||
lastName: z.string(),
|
||||
email: z.string(),
|
||||
phoneNumber: phoneValidator("Phone is required"),
|
||||
dateOfBirth: z.string(),
|
||||
address: z.object({
|
||||
city: z.string().default(""),
|
||||
country: z.string().default(""),
|
||||
countryCode: z.string().default(""),
|
||||
zipCode: z.string().default(""),
|
||||
streetAddress: z.string().default(""),
|
||||
}),
|
||||
password: passwordValidator("Password is required"),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user