diff options
Diffstat (limited to 'ufund-ui/src/app/components/signup/signup.component.ts')
-rw-r--r-- | ufund-ui/src/app/components/signup/signup.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ufund-ui/src/app/components/signup/signup.component.ts b/ufund-ui/src/app/components/signup/signup.component.ts index 3b43287..1ab863d 100644 --- a/ufund-ui/src/app/components/signup/signup.component.ts +++ b/ufund-ui/src/app/components/signup/signup.component.ts @@ -22,7 +22,7 @@ class PasswordRequirements { export class SignupComponent { protected passwordStatusText = new BehaviorSubject("") - protected confirmPassStatusText = new BehaviorSubject("") + protected passwordsMatch = new BehaviorSubject(false) protected usernameStatusText = new BehaviorSubject("") protected showSuccessMessage = new BehaviorSubject(false) protected passwordStrongEnough = new BehaviorSubject(false) @@ -51,7 +51,7 @@ export class SignupComponent { } validate(username: string, passConfirm:string, password: string) { - this.confirmPassStatusText.next("") + this.passwordsMatch.next(false) this.usernameStatusText.next("") this.checkPasswordStrength(password); @@ -59,8 +59,8 @@ export class SignupComponent { this.usernameStatusText.next("Username field can't be blank") } - if (!(password === passConfirm) && !!passConfirm) { - this.confirmPassStatusText.next("Passwords don't match") + if (passConfirm && password === passConfirm) { + this.passwordsMatch.next(true) } this.ableToCreateAccount.next(this.passwordStrongEnough.getValue() && password === passConfirm && !!username) } @@ -106,7 +106,7 @@ export class SignupComponent { } else if (strength == 0) { this.passwordStatusText.next("") } else { - this.passwordStatusText.next("Password does not meet requirements") + this.passwordStatusText.next("5/6 checks required") } this.strength.next(strength) |