Password bugs solved

This commit is contained in:
Senthamilselvi 2025-11-06 09:35:46 +05:30
parent 5735016d1c
commit eb7226a6d7
2 changed files with 5 additions and 5 deletions

View File

@ -84,7 +84,7 @@ const ChangePassword = () => {
];
const failedRule = rules.find(r => !r.regex.test(password));
return failedRule ? `Password must contain: ${failedRule.msg}.` : "";
return failedRule ? `Password must meet complexity requirements.` : "";
};
const handleSubmit = async (e) => {

View File

@ -121,7 +121,7 @@ const PublicContactForm = () => {
const response = await apiClient.post("/forgot-password/request-otp", payload);
if (response?.data) {
showToast('success', 'OTP sent to your registered email successfully!');
showToast('success', 'Verification Code sent to your registered email successfully!');
setTimeout(() => {
navigate("/change-password", {
state: { email: formData.email.trim() },
@ -134,7 +134,7 @@ const PublicContactForm = () => {
const msg =
err.response?.data?.message ||
err.message ||
"Failed to send OTP. Please check your details and try again.";
"Failed to send Verification Code. Please check your details and try again.";
setErrorMsg(msg);
} finally {
setLoading(false);
@ -161,7 +161,7 @@ const PublicContactForm = () => {
const response = await apiClient.post("/forgot-password/verify-otp", payload);
if (response?.data?.status === "success") {
setSuccess("OTP verified successfully. Redirecting to change password...");
setSuccess("Verification Code verified successfully. Redirecting to change password...");
setTimeout(() => navigate("/change-password"), 1500);
} else {
const serverMsg = response?.data?.message?.toLowerCase() || "";
@ -190,7 +190,7 @@ const PublicContactForm = () => {
};
const handleResendOtp = () => {
setOtpMsg("A new OTP has been sent to your registered email.");
setOtpMsg("A new Verification Code has been sent to your registered email.");
setOtp("");
};