mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-04 00:48:52 +02:00
🔒 Registration form hardening (#1160)
This commit is contained in:
parent
db8655aab9
commit
c307963a0e
5 changed files with 154 additions and 99 deletions
|
@ -12,8 +12,8 @@ export const auth = router({
|
|||
requestRegistration: publicProcedure
|
||||
.input(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
email: z.string(),
|
||||
name: z.string().nonempty().max(100),
|
||||
email: z.string().email(),
|
||||
}),
|
||||
)
|
||||
.mutation(
|
||||
|
|
|
@ -53,7 +53,7 @@ export const participants = router({
|
|||
.input(
|
||||
z.object({
|
||||
pollId: z.string(),
|
||||
name: z.string().min(1, "Participant name is required"),
|
||||
name: z.string().min(1, "Participant name is required").max(100),
|
||||
email: z.string().optional(),
|
||||
votes: z
|
||||
.object({
|
||||
|
|
|
@ -29,7 +29,7 @@ const buttonVariants = cva(
|
|||
size: {
|
||||
default: "h-9 px-2.5 gap-x-2.5 text-sm",
|
||||
sm: "h-7 text-sm px-1.5 gap-x-1.5 rounded-md",
|
||||
lg: "h-11 text-sm gap-x-3 px-4 rounded-md",
|
||||
lg: "h-11 text-base gap-x-3 px-4 rounded-md",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue