File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ export const signupSchema = z
10
10
. regex ( / (? = .* [ A - Z ] ) / , 'Password must contain at least one uppercase letter' )
11
11
. regex ( / (? = .* \d ) / , 'Password must contain at least one number' ) ,
12
12
confirmPassword : z . string ( ) . min ( 1 , 'Please confirm your password' ) ,
13
- terms : z . literal ( true , {
14
- errorMap : ( ) => ( { message : 'You must accept the terms' } )
13
+ terms : z . boolean ( ) . refine ( val => val === true , {
14
+ message : 'You must accept the terms'
15
15
} ) ,
16
16
} )
17
17
. refine ( ( data ) => data . password === data . confirmPassword , {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export function SignupForm() {
29
29
email : "" ,
30
30
password : "" ,
31
31
confirmPassword : "" ,
32
- terms : true ,
32
+ terms : false ,
33
33
} ,
34
34
} ) ;
35
35
const router = useRouter ( ) ;
You can’t perform that action at this time.
0 commit comments