mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-08 07:05:12 +00:00
fix(login): mfa prompt UI improvements, fix register field validation, email validation (#4672)
* fix: mfa prompt styling * register password field validation * loginname overflow, mfa hover effect * cleanup * Update internal/api/ui/login/static/resources/scripts/password_policy_check.js Co-authored-by: Silvan <[email protected]> * prettier if check * cleanup * Update internal/api/ui/login/static/resources/scripts/password_policy_check.js Co-authored-by: Livio Spring <[email protected]> * fix confirmation validation, cleanup * rm log * email type validation * add email validation * change pattern * pattern * comment RFC 2822 * dont wrapp org name * rm email validation Co-authored-by: Silvan <[email protected]> Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Silvan
Livio Spring
parent
7db87f4646
commit
2a8dfab192
@@ -1,16 +1,14 @@
|
||||
function CheckRegisterPwPolicy() {
|
||||
let policyElement = document.getElementById("register-password");
|
||||
let pwNew = policyElement.value;
|
||||
let pwNewConfirmation = document.getElementById("register-password-confirmation").value;
|
||||
const pwNew = document.getElementById("register-password");
|
||||
const pwNewConfirmation = document.getElementById(
|
||||
"register-password-confirmation"
|
||||
);
|
||||
const pwNewValue = pwNew.value;
|
||||
const pwNewConfirmationValue = pwNewConfirmation.value;
|
||||
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) === false) {
|
||||
policyElement.setAttribute("color", "warn");
|
||||
return false;
|
||||
} else {
|
||||
policyElement.setAttribute("color", "primary");
|
||||
}
|
||||
ComplexityPolicyCheck(pwNew, pwNewConfirmation);
|
||||
|
||||
return pwNew == pwNewConfirmation;
|
||||
return pwNewValue == pwNewConfirmationValue;
|
||||
}
|
||||
|
||||
let button = document.getElementById("register-button");
|
||||
|
||||
Reference in New Issue
Block a user