Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Added password requirements on registration page #111

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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