Connected password form to redux
This commit is contained in:
1 parent
9277a37559
commit
682b7b4d06
4 files changed
+40
-24
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user