feat(ui): add password confirmations (#2291)

* feat(ui): add password confirmation to setup screen

* feat(ui): add password confirmation to create user dialog

* fix(tests): force frontend tests to use jsdom, and run tests in isolated environment. Also add debug statements to further diagnose failing test if needed

---------

Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
This commit is contained in:
arjunsrinivasan1997
2026-01-19 08:41:42 -07:00
committed by GitHub
co-authored by ACX
parent dfd757fe36
commit 4253322d2c
9 changed files with 398 additions and 30 deletions
@@ -0,0 +1,13 @@
import {AbstractControl, ValidationErrors, ValidatorFn} from '@angular/forms';
export const passwordMatchValidator = (
passwordControlName: string,
confirmPasswordControlName: string
): ValidatorFn => (control: AbstractControl): ValidationErrors | null => {
const password = control.get(passwordControlName)?.value;
const confirmPassword = control.get(confirmPasswordControlName)?.value;
if (!password || !confirmPassword) return null;
return password === confirmPassword ? null : {passwordMismatch: true};
};