-
Notifications
You must be signed in to change notification settings - Fork 2
/
schemas.ts
27 lines (26 loc) · 922 Bytes
/
schemas.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { z } from "zod";
export const registerFormSchema = z.object({
artisticName: z //object with two properties: value and string. both with atleast 3 letters
.object({
value: z.string().min(3, {
message: "artisticName must be at least 2 characters.",
}),
label: z.string().min(3, {
message: "artisticName must be at least 2 characters.",
}),
}),
email: z.string().min(2, {
message: "Username must be at least 2 characters.",
}),
name: z.string().min(2, {
message: "Username must be at least 2 characters.",
}),
password: z.string().min(2, {
message: "Password must be at least 2 characters.",
}),
confirmPassword: z.string().min(2, {
message: "Password must be at least 2 characters.",
}),
confirm: z.boolean(),
role: z.string().min(2, {}),
});