AI Implementation feature(821): First-Start Create Admin Modal (#2)

This commit was merged in pull request #2.
This commit is contained in:
2026-07-21 14:45:55 +00:00
parent 03bcb6b156
commit 9f67ec8c50
30 changed files with 1306 additions and 141 deletions
@@ -0,0 +1,20 @@
export interface PasswordMatchGroupLike {
get(name: 'password' | 'passwordConfirm'): { value: string | null | undefined } | null;
}
export interface PasswordMatchResult {
passwordMismatch?: boolean;
}
/**
* Group-level validator for the "Confirm Password" field.
* Returns `{ passwordMismatch: true }` when the two values differ,
* or `null` when they match (or when either is empty, so that
* `required`/`minlength` validators can take over).
*/
export function passwordMatchValidator(group: PasswordMatchGroupLike): PasswordMatchResult | null {
const password = group.get('password')?.value;
const confirm = group.get('passwordConfirm')?.value;
if (!password || !confirm) return null;
return password === confirm ? null : { passwordMismatch: true };
}