webupdatev1

This commit is contained in:
Local Server
2026-01-04 17:52:37 -06:00
parent 1919f6f8bb
commit c1da8eff42
81 changed files with 16728 additions and 475 deletions

View File

@@ -31,9 +31,7 @@ const validators = {
.withMessage("Valid email is required")
.normalizeEmail()
.trim(),
body("password")
.isLength({ min: 8 })
.withMessage("Password must be at least 8 characters"),
body("password").notEmpty().withMessage("Password is required").trim(),
],
// User validators
@@ -51,10 +49,10 @@ const validators = {
)
.trim(),
body("password")
.isLength({ min: 8 })
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/)
.isLength({ min: 12 })
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])/)
.withMessage(
"Password must be at least 8 characters with uppercase, lowercase, and number"
"Password must be at least 12 characters with uppercase, lowercase, number, and special character"
),
body("role_id").notEmpty().withMessage("Role is required").trim(),
],