Max Peintner 2a8dfab192
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 <silvan.reusser@gmail.com>

* prettier if check

* cleanup

* Update internal/api/ui/login/static/resources/scripts/password_policy_check.js

Co-authored-by: Livio Spring <livio.a@gmail.com>

* 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 <silvan.reusser@gmail.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
2022-11-17 13:25:09 +01:00

16 lines
490 B
JavaScript

function CheckRegisterPwPolicy() {
const pwNew = document.getElementById("register-password");
const pwNewConfirmation = document.getElementById(
"register-password-confirmation"
);
const pwNewValue = pwNew.value;
const pwNewConfirmationValue = pwNewConfirmation.value;
ComplexityPolicyCheck(pwNew, pwNewConfirmation);
return pwNewValue == pwNewConfirmationValue;
}
let button = document.getElementById("register-button");
disableSubmit(CheckRegisterPwPolicy, button);