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