feat: validation on change working for SetNewPassword

This commit is contained in:
Caio Cabral committed 2024-10-23 19:51:52 -04:00
1 parent 9b3f73da0e
commit 6905f49d3b
2 files changed
+49 -37

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ const passwordSchema = joi
return value;
})
.custom((value, helpers) => {
if (!/[!@#$%^&*]/.test(value)) {
if (!/[!?@#$%^&*()\-_=+[\]{};:'",.<>~`|\\/]/.test(value)) {
return helpers.message("special");
}
return value;