Skip to content

Commit

Permalink
On the registration page, added an alert that informs the user of the…
Browse files Browse the repository at this point in the history
… password requirements if their password does not meet the requirements. Addresses Issue systers#76. Motivation for this fix is for the user to easily generate a password. Previously, the user had to guess what the password requirements were.
  • Loading branch information
zyang7 committed Apr 16, 2018
1 parent 9a0e920 commit 64fbb0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ <h3 class="form-signin-heading">{{language?.messages.heading}}</h3>
<p *ngIf="regForm.controls['email'].hasError('required') && (regForm.controls['email'].touched && !isFocused)" class="alert alert-danger" role="alert">{{authMessages?.errors.emailReq}}</p>
<p *ngIf="regForm.controls['email'].hasError('pattern') && (regForm.controls['email'].touched) && !isFocused" class="alert alert-danger" role="alert">{{authMessages?.errors.emailInvalid}}</p>
<p *ngIf="regForm.controls['password'].hasError('required') && (regForm.controls['password'].touched && !isFocused)" class="alert alert-danger" role="alert">{{authMessages?.errors.passwordReq}}</p>
<p *ngIf="regForm.controls['password'].hasError('pattern') && (regForm.controls['password'].touched && !isFocused)" class="alert alert-danger" role="alert">{{authMessages?.errors.passwordInvalid}}</p>
<p *ngIf="regForm.controls['confirmpassword'].value!=regForm.controls['password'].value && (regForm.controls['confirmpassword'].touched && !isFocused)" class="alert alert-danger" role="alert">{{authMessages?.errors.passwordMatch}}</p>
</div>
<div class="alert alert-danger" *ngIf="errorMessage">{{errorMessage}}</div>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/languages/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"emailReq": "Email is required",
"emailInvalid": "The email address is invalid",
"passwordReq": "Password is required",
"passwordInvalid": "Password is invalid",
"passwordInvalid": "Password is invalid. Password must: Be a minimum of 8 characters; Contain at least 1 lowercase and 1 uppercase letter; Contain at least 1 special character (!@#$%^&*); Contain at least 1 number (0–9)",
"passwordMatch": "Passwords should match",
"loginError": "Incorrect username and password, please try again",
"registrationFail": "Registration unsuccesful"
Expand Down

0 comments on commit 64fbb0c

Please sign in to comment.