bugfixing password
This commit is contained in:
parent
c9bf8c45ad
commit
a14aeffa48
@ -20,13 +20,13 @@ export const registerUserSchema = z
|
|||||||
.email({ message: 'Email must be a valid email' }),
|
.email({ message: 'Email must be a valid email' }),
|
||||||
password: z
|
password: z
|
||||||
.string({ required_error: 'Password is required' })
|
.string({ required_error: 'Password is required' })
|
||||||
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^]{8,}$/, {
|
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^_*]{8,}$/, {
|
||||||
message:
|
message:
|
||||||
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
||||||
}),
|
}),
|
||||||
passwordConfirm: z
|
passwordConfirm: z
|
||||||
.string({ required_error: 'Confirm Password is required' })
|
.string({ required_error: 'Confirm Password is required' })
|
||||||
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^]{8,}$/, {
|
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^_*]{8,}$/, {
|
||||||
message:
|
message:
|
||||||
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
||||||
})
|
})
|
||||||
@ -189,13 +189,13 @@ export const updatePasswordSchema = z
|
|||||||
oldPassword: z.string({ required_error: 'Old password is required' }),
|
oldPassword: z.string({ required_error: 'Old password is required' }),
|
||||||
password: z
|
password: z
|
||||||
.string({ required_error: 'Password is required' })
|
.string({ required_error: 'Password is required' })
|
||||||
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^]{8,}$/, {
|
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^_*]{8,}$/, {
|
||||||
message:
|
message:
|
||||||
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
||||||
}),
|
}),
|
||||||
passwordConfirm: z
|
passwordConfirm: z
|
||||||
.string({ required_error: 'Confirm Password is required' })
|
.string({ required_error: 'Confirm Password is required' })
|
||||||
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^]{8,}$/, {
|
.regex(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d@$!%*#?&+\-,.\[\]{};':"\\|/=\(\)\^_*]{8,}$/, {
|
||||||
message:
|
message:
|
||||||
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
'Password must be a minimum of 8 characters & contain at least one letter, one number, and one special character.'
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user