mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix: apply password match validation only on sign-up form
This commit is contained in:
@@ -37,7 +37,10 @@ export const authFormSchema = (type: string) =>
|
||||
message: "It must contain at least 12 characters.",
|
||||
}),
|
||||
})
|
||||
.refine((data) => data.password === data.confirmPassword, {
|
||||
message: "The password must match",
|
||||
path: ["confirmPassword"],
|
||||
});
|
||||
.refine(
|
||||
(data) => type === "sign-in" || data.password === data.confirmPassword,
|
||||
{
|
||||
message: "The password must match",
|
||||
path: ["confirmPassword"],
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user