mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
password requirements allow more special chars
This commit is contained in:
@@ -12,8 +12,8 @@ export const validateLogin = [
|
||||
.optional()
|
||||
.isLength({ min: 8 })
|
||||
.withMessage('Password must be at least 8 characters')
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character (@$!%*?&)'),
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character'),
|
||||
];
|
||||
|
||||
export const validateRegister = [
|
||||
@@ -33,8 +33,8 @@ export const validateRegister = [
|
||||
.optional()
|
||||
.isLength({ min: 8 })
|
||||
.withMessage('Password must be at least 8 characters')
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character (@$!%*?&)'),
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character'),
|
||||
];
|
||||
|
||||
// ===== EMPLOYEE VALIDATION =====
|
||||
@@ -55,8 +55,8 @@ export const validateEmployee = [
|
||||
.optional()
|
||||
.isLength({ min: 8 })
|
||||
.withMessage('Password must be at least 8 characters')
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character (@$!%*?&)'),
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character'),
|
||||
|
||||
body('employeeType')
|
||||
.isIn(['manager', 'personell', 'apprentice', 'guest'])
|
||||
@@ -154,8 +154,8 @@ export const validateChangePassword = [
|
||||
.optional()
|
||||
.isLength({ min: 8 })
|
||||
.withMessage('Password must be at least 8 characters')
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character (@$!%*?&)'),
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character'),
|
||||
];
|
||||
|
||||
// ===== SHIFT PLAN VALIDATION =====
|
||||
@@ -346,8 +346,8 @@ export const validateSetupAdmin = [
|
||||
.optional()
|
||||
.isLength({ min: 8 })
|
||||
.withMessage('Password must be at least 8 characters')
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character (@$!%*?&)'),
|
||||
.matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?])/)
|
||||
.withMessage('Password must contain uppercase, lowercase, number and special character'),
|
||||
];
|
||||
|
||||
// ===== SCHEDULING VALIDATION =====
|
||||
|
||||
Reference in New Issue
Block a user