@@ -36,20 +36,35 @@ module.exports.signupSchema = z.object({
3636} ) ;
3737
3838module . exports . changePasswordSchema = z . object ( {
39- currentPassword : z . string ( ) . min ( 1 , "Current password is required" ) ,
40- newPassword : z . string ( ) . min ( 6 , "New password must be at least 6 characters" ) ,
39+ currentPassword : z
40+ . string ( )
41+ . min ( 1 , "Current password is required" )
42+ . max ( 100 , "Password is too long." ) ,
43+ newPassword : z
44+ . string ( )
45+ . min ( 6 , "New password must be at least 6 characters" )
46+ . max ( 100 , "Password is too long." ) ,
4147} ) ;
4248
4349module . exports . deleteAccountSchema = z . object ( {
44- password : z . string ( ) . min ( 1 , "Password is required" ) ,
50+ password : z
51+ . string ( )
52+ . min ( 1 , "Password is required" )
53+ . max ( 100 , "Password is too long." ) ,
4554} ) ;
4655
4756module . exports . onlyEmailSchema = z . object ( {
48- email : z . string ( ) . email ( "Invalid email format" ) ,
57+ email : z
58+ . string ( )
59+ . email ( "Invalid email format" )
60+ . max ( 100 , "Email is too long." ) ,
4961} ) ;
5062
5163module . exports . verifyOtpSchema = z . object ( {
52- email : z . string ( ) . email ( "Invalid email format" ) ,
64+ email : z
65+ . string ( )
66+ . email ( "Invalid email format" )
67+ . max ( 100 , "Email is too long." ) ,
5368 otp : z . string ( ) . length ( 6 , "OTP must be 6 digits" ) ,
5469} ) ;
5570
0 commit comments