Added validation for eamil field in forgot-password page. Make axios request to backend

This commit is contained in:
Alex Holliday committed 2024-06-11 12:58:21 -07:00
1 parent 7bd4ce9e6a
commit d1427010c2
3 files changed
+60 -3

No files matched your search

+12 -1
View File
@@ -40,4 +40,15 @@ const loginValidation = joi.object({
}),
});
export { registerValidation, loginValidation };
const recoveryValidation = joi.object({
email: joi
.string()
.email({ tlds: { allow: false } })
.required()
.messages({
"string.email": "Email must be a valid email",
"string.empty": "Email is required",
}),
});
export { registerValidation, loginValidation, recoveryValidation };