feat: validation on change working for SetNewPassword
This commit is contained in:
1 parent
9b3f73da0e
commit
6905f49d3b
2 files changed
+49
-37
No files matched your search
@@ -39,7 +39,7 @@ const passwordSchema = joi
|
||||
return value;
|
||||
})
|
||||
.custom((value, helpers) => {
|
||||
if (!/[!@#$%^&*]/.test(value)) {
|
||||
if (!/[!?@#$%^&*()\-_=+[\]{};:'",.<>~`|\\/]/.test(value)) {
|
||||
return helpers.message("special");
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in new issue
Block a user