Connected password form to redux

This commit is contained in:
Daniel Cojocea committed 2024-07-10 18:26:05 -04:00
1 parent 9277a37559
commit 682b7b4d06
4 files changed
+40 -24

No files matched your search

+3 -3
View File
@@ -119,7 +119,7 @@ const passwordSchema = joi
const editPasswordValidation = joi.object({
// TBD - validation for current password ?
password: passwordSchema,
newpassword: passwordSchema,
newPassword: passwordSchema,
confirm: joi
.string()
.trim()
@@ -127,8 +127,8 @@ const editPasswordValidation = joi.object({
"string.empty": "*Password confirmation is required.",
})
.custom((value, helpers) => {
const { newpassword } = helpers.prefs.context;
if (value !== newpassword) {
const { newPassword } = helpers.prefs.context;
if (value !== newPassword) {
return helpers.message("*Passwords do not match.");
}
return value;