mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added user password validation, Fixed new user localization issue
This commit is contained in:
@@ -187,4 +187,11 @@ async function loadUsersIntoSelect(selectElement, selectedValue = null) {
|
||||
console.error('Error loading users:', err);
|
||||
showToast(appTranslations.errorLoadingUsers, 'danger');
|
||||
}
|
||||
}
|
||||
|
||||
function validatePassword(password) {
|
||||
// Regex: min 8 chars, one uppercase, one lowercase, one number, one special char
|
||||
const strongPasswordRegex =
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_\-+=\[{\]};:'",<.>/?\\|`~]).{8,}$/;
|
||||
return strongPasswordRegex.test(password);
|
||||
}
|
||||
Reference in New Issue
Block a user