mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-06-29 13:43:58 +00:00
Update user schema and forms to include address and consent fields
- Replaced 'house_name' with 'address' in user schema and related files. - Added new fields for terms and privacy policy acceptance in the signup form schema. - Updated package.json and package-lock.json to include @radix-ui/react-checkbox for checkbox functionality. - Modified seed script to reflect changes in the user model.
This commit is contained in:
@ -9,11 +9,21 @@ export const signUpFormSchema = z.object({
|
||||
island_id: z
|
||||
.string({ required_error: "Island is required." })
|
||||
.min(2, { message: "Island is required." }),
|
||||
house_name: z.string().min(2, { message: "House name is required." }),
|
||||
address: z.string().min(2, { message: "address is required." }),
|
||||
dob: z.coerce.date({ message: "Date of birth is required." }),
|
||||
phone_number: z
|
||||
.string()
|
||||
.min(7, { message: "Phone number is required." })
|
||||
.regex(/^[79][0-9]{2}[0-9]{4}$/, "Please enter a valid phone number")
|
||||
.transform((val) => val.replace(/\D/g, "")),
|
||||
terms: z
|
||||
.string({
|
||||
required_error: "You must accept the terms and conditions",
|
||||
})
|
||||
.transform((val) => val === "on"),
|
||||
policy: z
|
||||
.string({
|
||||
required_error: "You must accept the privacy policy",
|
||||
})
|
||||
.transform((val) => val === "on"),
|
||||
});
|
||||
|
Reference in New Issue
Block a user